def METHOD_NAME(tmp_path, runtime, mocker):
    mocker.patch.dict('os.environ', {'HOME': str(tmp_path)}, clear=True)
    tmp_path.joinpath('.ssh').mkdir()
    kwargs = {
        'private_data_dir': tmp_path,
        'process_isolation': True,
        'container_image': 'my_container',
        'process_isolation_executable': runtime
    }
    rc = InventoryConfig(**kwargs)
    rc.ident = 'foo'
    inventories = ['/tmp/inventory1', '/tmp/inventory2']
    rc.prepare_inventory_command('list', inventories, response_format='yaml', playbook_dir='/tmp',
                                 vault_ids='1234', vault_password_file='/tmp/password', output_file='/tmp/inv_out.txt',
                                 export=True)
    assert rc.runner_mode == 'subprocess'
    extra_container_args = []
    if runtime == 'podman':
        extra_container_args = ['--quiet']
    else:
        extra_container_args = [f'--user={os.getuid()}']
    expected_command_start = [
        runtime,
        'run',
        '--rm',
        '--interactive',
        '--workdir',
        '/runner/project',
        '-v', f'{rc.private_data_dir}/.ssh/:/home/runner/.ssh/',
        '-v', f'{rc.private_data_dir}/.ssh/:/root/.ssh/',
    ]
    if os.path.exists('/etc/ssh/ssh_known_hosts'):
        expected_command_start.extend(['-v', '/etc/ssh/:/etc/ssh/'])
    if runtime == 'podman':
        expected_command_start.extend(['--group-add=root', '--ipc=host'])
    expected_command_start.extend([
        '-v', f'{rc.private_data_dir}/artifacts/:/runner/artifacts/:Z',
        '-v', f'{rc.private_data_dir}/:/runner/:Z',
        '--env-file', f'{rc.artifact_dir}/env.list',
    ])
    expected_command_start.extend(extra_container_args)
    expected_command_start.extend([
        '--name',
        'ansible_runner_foo',
        'my_container',
        'ansible-inventory',
        '--list',
        '-i', '/tmp/inventory1',
        '-i', '/tmp/inventory2',
        '--yaml',
        '--playbook-dir', '/tmp',
        '--vault-id', '1234',
        '--vault-password-file', '/tmp/password',
        '--output', '/tmp/inv_out.txt',
        '--export',
    ])
    assert expected_command_start == rc.command