def parse_model_group_list(path, groups):
context = FilePathContext(path)<EOL>for model_group in groups:<EOL><INDENT>if '<STR_LIT>' in model_group:<EOL><INDENT>include_context = context.resolve(model_group['<STR_LIT>'])<EOL>for reaction_id in parse_model_file(include_context):<EOL><INDENT>yield reaction_id<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for reaction_id in parse_model_group(context, model_group):<EOL><INDENT>yield reaction_id<EOL><DEDENT><DEDENT><DEDENT>
Parse a structured list of model groups as obtained from a YAML file

    Yields reaction IDs. Path can be given as a string or a context.