def METHOD_NAME():
    parser = argparse.ArgumentParser(description='Sming hardware configuration utility')
    parser.add_argument('--no-verify', help="Don't verify partition table fields", action='store_true')
    parser.add_argument('--quiet', '-q', help="Don't print non-critical status messages to stderr", action='store_true')
    parser.add_argument('--secure', help="Require app partitions to be suitable for secure boot", action='store_true')
    parser.add_argument('--part', help="Name of partition to operate on")
    parser.add_argument('command', help='Action to perform', choices=['partgen', 'expr', 'validate', 'flashcheck'])
    parser.add_argument('input', help='Name of hardware configuration or path to binary partition table')
    parser.add_argument('output', help='Path to output file. Will use stdout if omitted.', nargs='?', default='-')
    parser.add_argument('expr', help='Expression to evaluate', nargs='?', default=None)
    args = parser.parse_args()
    common.quiet = args.quiet
    output = None
    input_is_binary = False
    if os.path.exists(args.input):
        inputData = open(args.input, "rb").read()
        input_is_binary = inputData[0:2] == partition.Entry.MAGIC_BYTES
        if input_is_binary:
            config = Config.from_binary(inputData)
        else:
            raise InputError("File '%s' not recognised as partition table" % args.input)
    else:
        config = Config.from_name(args.input)
        partitions = config.partitions
    # Locate any supplied partition by name
    part = None
    if args.part is not None:
        part = partitions.find_by_name(args.part)
        if part is None:
            return
    output = globals()['handle_' + args.command](args, config, part)
    if output is not None:
        openOutput(args.output).write(output)