code: def parse_reaction(reaction_def, default_compartment, context=None):
      
  
      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)
docs: Parse a structured reaction definition as obtained from a YAML file
  
      Returns a ReactionEntry.