def METHOD_NAME(tmp_path_factory):
    dpath = tmp_path_factory.mktemp("roster")
    roster_py_contents = """
    #!/usr/bin/env python
    import json
    import sys
    inventory = {
        "usa": {"children": ["southeast"]},
        "southeast": {
            "children": ["atlanta", "raleigh"],
            "vars": {
                "some_server": "foo.southeast.example.com",
                "halon_system_timeout": 30,
                "self_destruct_countdown": 60,
                "escape_pods": 2,
            },
        },
        "raleigh": ["host2", "host3"],
        "atlanta": ["host1", "host2"],
    }
    hostvars = {"host1": {}, "host2": {}, "host3": {}}
    if "--host" in sys.argv:
        print(json.dumps(hostvars.get(sys.argv[-1], {})))
    if "--list" in sys.argv:
        print(json.dumps(inventory))
    """
    roster_ini_contents = """
    [atlanta]
    host1
    host2
    [raleigh]
    host2
    host3
    [southeast:children]
    atlanta
    raleigh
    [southeast:vars]
    some_server=foo.southeast.example.com
    halon_system_timeout=30
    self_destruct_countdown=60
    escape_pods=2
    [usa:children]
    southeast
    """
    roster_yaml_contents = """
    atlanta:
      hosts:
        host1:
        host2:
    raleigh:
      hosts:
        host2:
        host3:
    southeast:
      children:
        atlanta:
        raleigh:
      vars:
        some_server: foo.southeast.example.com
        halon_system_timeout: 30
        self_destruct_countdown: 60
        escape_pods: 2
    usa:
      children:
        southeast:
    """
    with pytest.helpers.temp_file(
        "roster.py", roster_py_contents, directory=dpath
    ) as py_roster:
        py_roster.chmod(0o755)
        with pytest.helpers.temp_file(
            "roster.ini", roster_ini_contents, directory=dpath
        ), pytest.helpers.temp_file(
            "roster.yml", roster_yaml_contents, directory=dpath
        ):
            try:
                yield dpath
            finally:
                shutil.rmtree(str(dpath), ignore_errors=True)