def METHOD_NAME():
    load_modules()
    try:
        opts, args = getopt.getopt(sys.argv[1:], "hl:av",
                                   ["help", "logfile=", "append",
                                    "verbose", "vverbose", "vvverbose"])
    except getopt.GetoptError:
        usage_and_exit(1)
    log_file = None
    verbosity = 0
    append = False
    for opt in opts:
        if opt[0] in ('-h', '--help'):
            usage_and_exit(0)
        elif opt[0] in ('-l', '--logfile'):
            log_file = opt[1]
        elif opt[0] in ('-v'):
            verbosity += 1
        elif opt[0] == '--verbose':
            verbosity = 1
        elif opt[0] == '--vverbose':
            verbosity = 2
        elif opt[0] == '--vvverbose':
            verbosity = 3
        elif opt[0] in ('-a', '--append'):
            append = True
    setup_logging(log_file, verbosity, append)
    if len(args) < 1:
        usage_and_exit(1)
    cmd = args[0]
    if cmd not in tool_command:
        usage_and_exit(1)
    try:
        return tool_command[cmd]["command"](*args)
    except vdsm.tool.ExtraArgsError:
        print_command_usage(tool_command[cmd]["command"], sys.stderr)
        return 1
    except vdsm.tool.UsageError as e:
        print('Error: ', e, '\n', file=sys.stderr)
        return 1
    except Exception:
        traceback.print_exc(file=sys.stderr)
        return 1
    except KeyboardInterrupt:
        print("Interrupted", file=sys.stderr)
        return 1