def parse_args(name="<STR_LIT>", args=None):
def _load_json_file(path):<EOL><INDENT>with open(path) as f:<EOL><INDENT>json_data = json.load(f)<EOL>json_data['<STR_LIT>'] = path<EOL>return json_data<EOL><DEDENT><DEDENT>parser = argparse.ArgumentParser(description="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % name)<EOL>parser.add_argument('<STR_LIT:-c>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=_load_json_file,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>required=True)<EOL>group = parser.add_mutually_exclusive_group(required=True)<EOL>group.add_argument('<STR_LIT>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=str,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>')<EOL>group.add_argument('<STR_LIT>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=_load_json_file,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=_load_json_file,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>required=True)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>type=_load_json_file,<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>required=True)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=parse_date,<EOL>help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>', dest='<STR_LIT>',<EOL>type=parse_date,<EOL>help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>',<EOL>help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>',<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL>parser.set_defaults(console_logging=False, dry_run=False)<EOL>args = parser.parse_args(args)<EOL>return args<EOL>
Parse command line argument for a collector

    Returns an argparse.Namespace with 'config' and 'query' options