def prepare(doc):
    """
    Prepare the document

    Arguments
    ---------
        doc:
            The pandoc document
    """
    doc.defined = []
    meta = doc.get_metadata('pandoc-beamer-block')
    if isinstance(meta, list):
        for definition in meta:
            if isinstance(definition, dict
                ) and 'classes' in definition and isinstance(definition[
                'classes'], list):
                definition['classes'] = frozenset(definition['classes'])
                definition['type'] = definition.get('type', 'info')
                doc.defined.append(definition)
