Parse a structured compound definition as obtained from a YAML file

    Returns a CompoundEntry.

def parse_compound(compound_def, context=None):
    """Parse a structured compound definition as obtained from a YAML file

    Returns a CompoundEntry."""

    compound_id = compound_def.get('id')
    _check_id(compound_id, 'Compound')

    mark = FileMark(context, None, None)
    return CompoundEntry(compound_def, mark)