def METHOD_NAME(
    request: _pytest.fixtures.SubRequest,
) -> Iterator[Union[str, PubsubEmulator]]:
    if "PUBSUB_EMULATOR_HOST" in os.environ:
        yield "remote"
    elif request.config.getoption("server") is None:
        emulator = PubsubEmulator(max_workers=1, port=0)
        emulator.logger.setLevel(logging.DEBUG)
        try:
            os.environ["PUBSUB_EMULATOR_HOST"] = "localhost:%d" % emulator.port
            yield emulator
        finally:
            emulator.server.stop(grace=None)
    else:
        yield "google"