def run(): 
out_file, out_format, arguments = parse()<EOL>user, key = arguments.pop('<STR_LIT:user>', None), arguments.pop('<STR_LIT:key>', None)<EOL>if not user or not key:<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>api = API(user, key, https=arguments.pop('<STR_LIT>'), verify_ssl=arguments.pop('<STR_LIT>'),<EOL>rate_limit=arguments.pop('<STR_LIT>'))<EOL>response = getattr(api, arguments.pop('<STR_LIT>'))(**arguments)<EOL>output = str(getattr(response, out_format) if out_format != '<STR_LIT:list>' else response.as_list())<EOL>out_file.write(output if output.endswith('<STR_LIT:\n>') else output + '<STR_LIT:\n>')<EOL>
Defines how to start the CLI for the DomainTools API