def parse_reaction(reaction_def, default_compartment, context=None):
reaction_id = reaction_def.get('<STR_LIT:id>')<EOL>_check_id(reaction_id, '<STR_LIT>')<EOL>reaction_props = dict(reaction_def)<EOL>if '<STR_LIT>' in reaction_def:<EOL><INDENT>reaction_props['<STR_LIT>'] = parse_reaction_equation(<EOL>reaction_def['<STR_LIT>'], default_compartment)<EOL><DEDENT>mark = FileMark(context, None, None)<EOL>return ReactionEntry(reaction_props, mark)<EOL>
Parse a structured reaction definition as obtained from a YAML file

    Returns a ReactionEntry.