def METHOD_NAME() -> argparse.ArgumentParser:
    p = argparse.ArgumentParser(description="Test run options")
    p.add_argument('-n', '--dry-run', action='store_true',
                   help='show me, do not run tests')
    p.add_argument('-j', dest='jobs', type=int, default=1,
                   help='run tests in multiple parallel jobs')
    p.add_argument('-d', dest='debug', action='store_true', help='debug')
    p.add_argument('-p', dest='print', action='store_true',
                   help='redirects qemu\'s stdout and stderr to '
                        'the test output')
    p.add_argument('-gdb', action='store_true',
                   help="start gdbserver with $GDB_OPTIONS options "
                        "('localhost:12345' if $GDB_OPTIONS is empty)")
    p.add_argument('-valgrind', action='store_true',
                   help='use valgrind, sets VALGRIND_QEMU environment '
                        'variable')
    p.add_argument('-misalign', action='store_true',
                   help='misalign memory allocations')
    p.add_argument('--color', choices=['on', 'off', 'auto'],
                   default='auto', help="use terminal colors. The default "
                   "'auto' value means use colors if terminal stdout detected")
    p.add_argument('-tap', action='store_true',
                   help='produce TAP output')
    g_env = p.add_argument_group('test environment options')
    mg = g_env.add_mutually_exclusive_group()
    # We don't set default for cachemode, as we need to distinguish default
    # from user input later.
    mg.add_argument('-nocache', dest='cachemode', action='store_const',
                    const='none', help='set cache mode "none" (O_DIRECT), '
                    'sets CACHEMODE environment variable')
    mg.add_argument('-c', dest='cachemode',
                    help='sets CACHEMODE environment variable')
    g_env.add_argument('-i', dest='aiomode', default='threads',
                       help='sets AIOMODE environment variable')
    p.set_defaults(imgfmt='raw', imgproto='file')
    format_list = ['raw', 'bochs', 'cloop', 'parallels', 'qcow', 'qcow2',
                   'qed', 'vdi', 'vpc', 'vhdx', 'vmdk', 'luks', 'dmg']
    g_fmt = p.add_argument_group(
        '  image format options',
        'The following options set the IMGFMT environment variable. '
        'At most one choice is allowed, default is "raw"')
    mg = g_fmt.add_mutually_exclusive_group()
    for fmt in format_list:
        mg.add_argument('-' + fmt, dest='imgfmt', action='store_const',
                        const=fmt, help=f'test {fmt}')
    protocol_list = ['file', 'rbd', 'nbd', 'ssh', 'nfs', 'fuse']
    g_prt = p.add_argument_group(
        '  image protocol options',
        'The following options set the IMGPROTO environment variable. '
        'At most one choice is allowed, default is "file"')
    mg = g_prt.add_mutually_exclusive_group()
    for prt in protocol_list:
        mg.add_argument('-' + prt, dest='imgproto', action='store_const',
                        const=prt, help=f'test {prt}')
    g_bash = p.add_argument_group('bash tests options',
                                  'The following options are ignored by '
                                  'python tests.')
    # TODO: make support for the following options in iotests.py
    g_bash.add_argument('-o', dest='imgopts',
                        help='options to pass to qemu-img create/convert, '
                        'sets IMGOPTS environment variable')
    g_sel = p.add_argument_group('test selecting options',
                                 'The following options specify test set '
                                 'to run.')
    g_sel.add_argument('-g', '--groups', metavar='group1,...',
                       help='include tests from these groups')
    g_sel.add_argument('-x', '--exclude-groups', metavar='group1,...',
                       help='exclude tests from these groups')
    g_sel.add_argument('--start-from', metavar='TEST',
                       help='Start from specified test: make sorted sequence '
                       'of tests as usual and then drop tests from the first '
                       'one to TEST (not inclusive). This may be used to '
                       'rerun failed ./check command, starting from the '
                       'middle of the process.')
    g_sel.add_argument('tests', metavar='TEST_FILES', nargs='*',
                       help='tests to run, or "--" followed by a command')
    return p