def METHOD_NAME():
    try:
        import argcomplete
    except ImportError:
        argcomplete = None
    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers(metavar='COMMAND')
    subparsers.required = True  # work-around for python 3 bug which makes subparsers optional
    populate = subparsers.add_parser('populate',
                                     help='populate report database')
    populate.set_defaults(func=populate_database)
    query = subparsers.add_parser('query',
                                  help='query report database')
    query.set_defaults(func=query_database)
    if argcomplete:
        argcomplete.autocomplete(parser)
    args = parser.METHOD_NAME()
    return args