def METHOD_NAME(
    iterator: t.Iterable[RecordBatch],
) -> t.Generator[RecordBatch, None, None]:
    svc = _load_bento_spark(bento_tag)
    assert (
        api_name in svc.apis
    ), "An error occurred transferring the Bento to the Spark worker."
    inference_api = svc.apis[api_name]
    assert inference_api.func is not None, "Inference API function not defined"
    # start bento server
    with reserve_free_port() as port:
        pass
    server = serve(bento_tag, port=port)
    Client.wait_until_server_ready("localhost", server.port, 30)
    client = HTTPClient(svc, f"http://localhost:{server.port}")
    for batch in iterator:
        func_input = inference_api.input.from_arrow(batch)
        func_output = client.call(api_name, func_input)
        yield inference_api.output.to_arrow(func_output)