def parse_reaction_list(path, reactions, default_compartment=None):
context = FilePathContext(path)<EOL>for reaction_def in reactions:<EOL><INDENT>if '<STR_LIT>' in reaction_def:<EOL><INDENT>include_context = context.resolve(reaction_def['<STR_LIT>'])<EOL>for reaction in parse_reaction_file(<EOL>include_context, default_compartment):<EOL><INDENT>yield reaction<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield parse_reaction(reaction_def, default_compartment, context)<EOL><DEDENT><DEDENT>
Parse a structured list of reactions as obtained from a YAML file

    Yields tuples of reaction ID and reaction object. Path can be given as a
    string or a context.