def process_definition(line, nanopubs_metadata):
matches = re.match('<STR_LIT>', line)<EOL>if matches:<EOL><INDENT>def_type = matches.group(<NUM_LIT:1>).lower()<EOL>if def_type == "<STR_LIT>":<EOL><INDENT>def_type = "<STR_LIT>"<EOL><DEDENT>elif def_type == "<STR_LIT>":<EOL><INDENT>def_type == "<STR_LIT>"<EOL><DEDENT>key = matches.group(<NUM_LIT:2>)<EOL>val = matches.group(<NUM_LIT:3>)<EOL>if def_type in nanopubs_metadata:<EOL><INDENT>nanopubs_metadata[def_type][key] = val<EOL><DEDENT>else:<EOL><INDENT>nanopubs_metadata[def_type] = {key: val}<EOL><DEDENT><DEDENT>matches = re.match("<STR_LIT>", line)<EOL>if matches:<EOL><INDENT>def_type = matches.group(<NUM_LIT:1>).lower()<EOL>if def_type == "<STR_LIT>":<EOL><INDENT>def_type = "<STR_LIT>"<EOL><DEDENT>elif def_type == "<STR_LIT>":<EOL><INDENT>def_type == "<STR_LIT>"<EOL><DEDENT>key = matches.group(<NUM_LIT:2>)<EOL>val = matches.group(<NUM_LIT:3>)<EOL>vals = convert_csv_str_to_list(val)<EOL>if def_type in nanopubs_metadata:<EOL><INDENT>nanopubs_metadata[def_type][key] = vals<EOL><DEDENT>else:<EOL><INDENT>nanopubs_metadata[def_type] = {key: vals}<EOL><DEDENT><DEDENT>return nanopubs_metadata<EOL>
Process DEFINE line in BEL script