<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_reaction(reaction_def, default_compartment, context=None):
 """Parse a structured reaction definition as obtained from a YAML file Returns a ReactionEntry. """


    reaction_id = reaction_def.get('id')
    _check_id(reaction_id, 'Reaction')

    reaction_props = dict(reaction_def)

    # Parse reaction equation
    if 'equation' in reaction_def:
        reaction_props['equation'] = parse_reaction_equation(
            reaction_def['equation'], default_compartment)

    mark = FileMark(context, None, None)
    return ReactionEntry(reaction_props, mark)