def check_to_generate_or_run(argv, sim):
print_v("<STR_LIT>" % <EOL>(argv, sim.id, sim.network))<EOL>if len(argv)==<NUM_LIT:1>:<EOL><INDENT>print_v("<STR_LIT>")<EOL>print_v("<STR_LIT>"+"<STR_LIT>")<EOL><DEDENT>if '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv:<EOL><INDENT>generate_and_run(sim, simulator='<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in argv or '<STR_LIT>' in argv:<EOL><INDENT>network = load_network_json(sim.network)<EOL>generate_neuroml2_from_network(network, validate=True)<EOL><DEDENT>elif '<STR_LIT>' in argv or '<STR_LIT>' in argv:<EOL><INDENT>network = load_network_json(sim.network)<EOL>generate_neuroml2_from_network(network, validate=True, format='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>for a in argv:<EOL><INDENT>if '<STR_LIT>' in a:<EOL><INDENT>num_processors = <NUM_LIT:1><EOL>if len(a)>len('<STR_LIT>'):<EOL><INDENT>num_processors = int(a[<NUM_LIT:12>:])<EOL><DEDENT>generate_and_run(sim, simulator='<STR_LIT>',num_processors=num_processors)<EOL><DEDENT>elif '<STR_LIT>' in a: <EOL><INDENT>generate_and_run(sim, simulator=a[<NUM_LIT:1>:]) <EOL><DEDENT>elif '<STR_LIT>' in a: <EOL><INDENT>generate_and_run(sim, simulator=a[<NUM_LIT:1>:])<EOL><DEDENT><DEDENT><DEDENT>
Useful method for calling in main method after network and simulation are 
generated, to handle some standard export options like -jnml, -graph etc.