Get the content dictionary based on the element's content
    vocabulary.

def get_content_dict(vocabularies, content_vocab):
    """Get the content dictionary based on the element's content
    vocabulary.
    """
    # Raise exception if the vocabulary can't be found.
    if vocabularies.get(content_vocab, None) is None:
        raise UNTLFormException(
            'Could not retrieve content vocabulary "%s" for the form.'
            % (content_vocab)
        )
    else:
        # Return the sorted vocabulary.
        return vocabularies.get(content_vocab)