def METHOD_NAME():
    parser = argparse.ArgumentParser(description="Launch a QEMU virtual machine with a UEFI Shell and chipsec")
    group = parser.add_mutually_exclusive_group()
    group.add_argument("-m", "--main", nargs="*", type=str,
                       help="start chipsec_main.py, optionally with some arguments")
    group.add_argument("-p", "--python", nargs="*", type=str,
                       help="start a Python-UEFI shell, optionally with some arguments")
    group.add_argument("-u", "--util", nargs="+", type=str,
                       help="start chipsec_util.py, with some arguments (use ' -' to escape the dash prefix)")
    parser.add_argument("--ovmf", type=str,
                        help="path to the OVMF firmware code")
    parser.add_argument("--memory", type=str, default="512M",
                        help="set the RAM size of the virtual machine (QEMU option -m)")
    parser.add_argument("-g", "--gui", action="store_true",
                        help="use QEMU graphics window")
    parser.add_argument("-H", "--host-cpu", action="store_true",
                        help="use host CPU")
    parser.add_argument("-M", "--machine", type=str,
                        help="specify QEMU machine ('pc', 'q35,smm=on'...)")
    parser.add_argument("-Q", "--qemu-arg", nargs="+", type=str,
                        help="specify additional QEMU arguments (use ' -' to escape the dash prefix)")
    args = parser.parse_args()
    ovmf_path = args.ovmf
    if not ovmf_path:
        for test_ovmf_path in OVMF_CODE_LOCATIONS:
            if Path(test_ovmf_path).exists():
                ovmf_path = test_ovmf_path
                break
        if not ovmf_path:
            print("No OVMF file found. You can specify one using option --ovmf.", file=sys.stderr)
            sys.exit(1)
    # Create startup.nsh
    start_cmd = None
    if args.METHOD_NAME is not None:
        start_cmd = [PYTHON_EFI_COMMAND, "chipsec_main.py"] + unescape_arguments(args.METHOD_NAME)
    elif args.python is not None:
        start_cmd = [PYTHON_EFI_COMMAND] + unescape_arguments(args.python)
    elif args.util is not None:
        start_cmd = [PYTHON_EFI_COMMAND, "chipsec_util.py"] + unescape_arguments(args.util)
    if start_cmd:
        startup_nsh = "fs0:\ncd chipsec\n" + " ".join(shlex.quote(arg) for arg in start_cmd) + "\nreset\n"
    else:
        startup_nsh = "@echo Type 'reset' to exit"
    qemu_cmd = [
        "qemu-system-x86_64",
        # Make OVMF boot directly in UEFI shell instead of trying network boot (PXE)
        "-nic", "none",
        # Enable exiting by entering "reset" in UEFI shell
        "-no-reboot",
        # Start OVMF
        "-drive", "if=pflash,format=raw,readonly=on,file=" + ovmf_path,
    ]
    if not args.gui:
        qemu_cmd += ["-nographic"]
    if args.memory:
        qemu_cmd += ["-m", args.memory]
    if args.host_cpu:
        qemu_cmd += ["-cpu", "host", "-enable-kvm"]
    if args.machine:
        qemu_cmd += ["-machine", args.machine]
    with tempfile.NamedTemporaryFile(prefix="efidisk_") as tmpdisk:
        create_efi_disk(tmpdisk.name, startup_nsh)
        qemu_cmd += ["-drive", "format=qcow2,file=" + tmpdisk.name]
        if args.qemu_arg:
            qemu_cmd += [arg[1:] if arg.startswith(" ") else arg for arg in args.qemu_arg]
        print("Launching {}".format(" ".join(qemu_cmd)))
        subprocess.run(qemu_cmd, check=True)