def dev_server(tmp_path: Path) -> cabc.Iterator[StartDevServer]:
    """A function that will start a dev server in a subprocess and return a
    client for interacting with the server.
    """
    exit_stack = ExitStack()

    def start_dev_server(name: str = "standard", **kwargs: t.Any) -> DevServerClient:
        client = DevServerClient(name, tmp_path=tmp_path, **kwargs)
        exit_stack.enter_context(client)  # type: ignore[arg-type]
        return client

    with exit_stack:
        yield start_dev_server
A function that will start a dev server in a subprocess and return a
    client for interacting with the server.
    
tests/conftest.py