prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  pyarrow is a dependency but is not in `install_requires`
  
  ### Describe the problem
  <!-- Describe the problem clearly here. -->
  The source comes from this file: https://github.com/modin-project/modin/blob/master/modin/experimental/engines/pyarrow_on_ray/io.py#L4-L5
  
  ### Source code / logs
  <!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `modin/experimental/engines/pyarrow_on_ray/io.py`
  Content:
  ```
  1 from io import BytesIO
  2 
  3 import pandas
  4 import pyarrow as pa
  5 import pyarrow.csv as csv
  6 
  7 from modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler
  8 from modin.data_management.utils import get_default_chunksize
  9 from modin.engines.ray.generic.io import RayIO
  10 from modin.experimental.engines.pyarrow_on_ray.frame.data import PyarrowOnRayFrame
  11 from modin.experimental.engines.pyarrow_on_ray.frame.partition import (
  12     PyarrowOnRayFramePartition,
  13 )
  14 from modin import __execution_engine__
  15 
  16 if __execution_engine__ == "Ray":
  17     import ray
  18 
  19     @ray.remote
  20     def _read_csv_with_offset_pyarrow_on_ray(
  21         fname, num_splits, start, end, kwargs, header
  22     ):  # pragma: no cover
  23         """Use a Ray task to read a chunk of a CSV into a pyarrow Table.
  24          Note: Ray functions are not detected by codecov (thus pragma: no cover)
  25          Args:
  26             fname: The filename of the file to open.
  27             num_splits: The number of splits (partitions) to separate the DataFrame into.
  28             start: The start byte offset.
  29             end: The end byte offset.
  30             kwargs: The kwargs for the pyarrow `read_csv` function.
  31             header: The header of the file.
  32          Returns:
  33              A list containing the split pyarrow Tables and the the number of
  34              rows of the tables as the last element. This is used to determine
  35              the total length of the DataFrame to build a default Index.
  36         """
  37         bio = open(fname, "rb")
  38         # The header line for the CSV file
  39         first_line = bio.readline()
  40         bio.seek(start)
  41         to_read = header + first_line + bio.read(end - start)
  42         bio.close()
  43         table = csv.read_csv(
  44             BytesIO(to_read), parse_options=csv.ParseOptions(header_rows=1)
  45         )
  46         chunksize = get_default_chunksize(table.num_columns, num_splits)
  47         chunks = [
  48             pa.Table.from_arrays(table.columns[chunksize * i : chunksize * (i + 1)])
  49             for i in range(num_splits)
  50         ]
  51         return chunks + [
  52             table.num_rows,
  53             pandas.Series(
  54                 [t.to_pandas_dtype() for t in table.schema.types],
  55                 index=table.schema.names,
  56             ),
  57         ]
  58 
  59 
  60 class PyarrowOnRayIO(RayIO):
  61     frame_cls = PyarrowOnRayFrame
  62     frame_partition_cls = PyarrowOnRayFramePartition
  63     query_compiler_cls = PyarrowQueryCompiler
  64 
  65     read_parquet_remote_task = None
  66     if __execution_engine__ == "Ray":
  67         read_csv_remote_task = _read_csv_with_offset_pyarrow_on_ray
  68     read_hdf_remote_task = None
  69     read_feather_remote_task = None
  70     read_sql_remote_task = None
  71
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/modin/experimental/engines/pyarrow_on_ray/io.py b/modin/experimental/engines/pyarrow_on_ray/io.py
  --- a/modin/experimental/engines/pyarrow_on_ray/io.py
  +++ b/modin/experimental/engines/pyarrow_on_ray/io.py
  @@ -1,8 +1,6 @@
   from io import BytesIO
   
   import pandas
  -import pyarrow as pa
  -import pyarrow.csv as csv
   
   from modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler
   from modin.data_management.utils import get_default_chunksize
  @@ -15,6 +13,8 @@
   
   if __execution_engine__ == "Ray":
       import ray
  +    import pyarrow as pa
  +    import pyarrow.csv as csv
   
       @ray.remote
       def _read_csv_with_offset_pyarrow_on_ray(
  
verification_info: {"golden_diff": "diff --git a/modin/experimental/engines/pyarrow_on_ray/io.py b/modin/experimental/engines/pyarrow_on_ray/io.py\n--- a/modin/experimental/engines/pyarrow_on_ray/io.py\n+++ b/modin/experimental/engines/pyarrow_on_ray/io.py\n@@ -1,8 +1,6 @@\n from io import BytesIO\n \n import pandas\n-import pyarrow as pa\n-import pyarrow.csv as csv\n \n from modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler\n from modin.data_management.utils import get_default_chunksize\n@@ -15,6 +13,8 @@\n \n if __execution_engine__ == \"Ray\":\n     import ray\n+    import pyarrow as pa\n+    import pyarrow.csv as csv\n \n     @ray.remote\n     def _read_csv_with_offset_pyarrow_on_ray(\n", "issue": "pyarrow is a dependency but is not in `install_requires`\n\r\n### Describe the problem\r\n<!-- Describe the problem clearly here. -->\r\nThe source comes from this file: https://github.com/modin-project/modin/blob/master/modin/experimental/engines/pyarrow_on_ray/io.py#L4-L5\r\n\r\n### Source code / logs\r\n<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->\r\n\n", "before_files": [{"content": "from io import BytesIO\n\nimport pandas\nimport pyarrow as pa\nimport pyarrow.csv as csv\n\nfrom modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler\nfrom modin.data_management.utils import get_default_chunksize\nfrom modin.engines.ray.generic.io import RayIO\nfrom modin.experimental.engines.pyarrow_on_ray.frame.data import PyarrowOnRayFrame\nfrom modin.experimental.engines.pyarrow_on_ray.frame.partition import (\n    PyarrowOnRayFramePartition,\n)\nfrom modin import __execution_engine__\n\nif __execution_engine__ == \"Ray\":\n    import ray\n\n    @ray.remote\n    def _read_csv_with_offset_pyarrow_on_ray(\n        fname, num_splits, start, end, kwargs, header\n    ):  # pragma: no cover\n        \"\"\"Use a Ray task to read a chunk of a CSV into a pyarrow Table.\n         Note: Ray functions are not detected by codecov (thus pragma: no cover)\n         Args:\n            fname: The filename of the file to open.\n            num_splits: The number of splits (partitions) to separate the DataFrame into.\n            start: The start byte offset.\n            end: The end byte offset.\n            kwargs: The kwargs for the pyarrow `read_csv` function.\n            header: The header of the file.\n         Returns:\n             A list containing the split pyarrow Tables and the the number of\n             rows of the tables as the last element. This is used to determine\n             the total length of the DataFrame to build a default Index.\n        \"\"\"\n        bio = open(fname, \"rb\")\n        # The header line for the CSV file\n        first_line = bio.readline()\n        bio.seek(start)\n        to_read = header + first_line + bio.read(end - start)\n        bio.close()\n        table = csv.read_csv(\n            BytesIO(to_read), parse_options=csv.ParseOptions(header_rows=1)\n        )\n        chunksize = get_default_chunksize(table.num_columns, num_splits)\n        chunks = [\n            pa.Table.from_arrays(table.columns[chunksize * i : chunksize * (i + 1)])\n            for i in range(num_splits)\n        ]\n        return chunks + [\n            table.num_rows,\n            pandas.Series(\n                [t.to_pandas_dtype() for t in table.schema.types],\n                index=table.schema.names,\n            ),\n        ]\n\n\nclass PyarrowOnRayIO(RayIO):\n    frame_cls = PyarrowOnRayFrame\n    frame_partition_cls = PyarrowOnRayFramePartition\n    query_compiler_cls = PyarrowQueryCompiler\n\n    read_parquet_remote_task = None\n    if __execution_engine__ == \"Ray\":\n        read_csv_remote_task = _read_csv_with_offset_pyarrow_on_ray\n    read_hdf_remote_task = None\n    read_feather_remote_task = None\n    read_sql_remote_task = None\n", "path": "modin/experimental/engines/pyarrow_on_ray/io.py"}], "after_files": [{"content": "from io import BytesIO\n\nimport pandas\n\nfrom modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler\nfrom modin.data_management.utils import get_default_chunksize\nfrom modin.engines.ray.generic.io import RayIO\nfrom modin.experimental.engines.pyarrow_on_ray.frame.data import PyarrowOnRayFrame\nfrom modin.experimental.engines.pyarrow_on_ray.frame.partition import (\n    PyarrowOnRayFramePartition,\n)\nfrom modin import __execution_engine__\n\nif __execution_engine__ == \"Ray\":\n    import ray\n    import pyarrow as pa\n    import pyarrow.csv as csv\n\n    @ray.remote\n    def _read_csv_with_offset_pyarrow_on_ray(\n        fname, num_splits, start, end, kwargs, header\n    ):  # pragma: no cover\n        \"\"\"Use a Ray task to read a chunk of a CSV into a pyarrow Table.\n         Note: Ray functions are not detected by codecov (thus pragma: no cover)\n         Args:\n            fname: The filename of the file to open.\n            num_splits: The number of splits (partitions) to separate the DataFrame into.\n            start: The start byte offset.\n            end: The end byte offset.\n            kwargs: The kwargs for the pyarrow `read_csv` function.\n            header: The header of the file.\n         Returns:\n             A list containing the split pyarrow Tables and the the number of\n             rows of the tables as the last element. This is used to determine\n             the total length of the DataFrame to build a default Index.\n        \"\"\"\n        bio = open(fname, \"rb\")\n        # The header line for the CSV file\n        first_line = bio.readline()\n        bio.seek(start)\n        to_read = header + first_line + bio.read(end - start)\n        bio.close()\n        table = csv.read_csv(\n            BytesIO(to_read), parse_options=csv.ParseOptions(header_rows=1)\n        )\n        chunksize = get_default_chunksize(table.num_columns, num_splits)\n        chunks = [\n            pa.Table.from_arrays(table.columns[chunksize * i : chunksize * (i + 1)])\n            for i in range(num_splits)\n        ]\n        return chunks + [\n            table.num_rows,\n            pandas.Series(\n                [t.to_pandas_dtype() for t in table.schema.types],\n                index=table.schema.names,\n            ),\n        ]\n\n\nclass PyarrowOnRayIO(RayIO):\n    frame_cls = PyarrowOnRayFrame\n    frame_partition_cls = PyarrowOnRayFramePartition\n    query_compiler_cls = PyarrowQueryCompiler\n\n    read_parquet_remote_task = None\n    if __execution_engine__ == \"Ray\":\n        read_csv_remote_task = _read_csv_with_offset_pyarrow_on_ray\n    read_hdf_remote_task = None\n    read_feather_remote_task = None\n    read_sql_remote_task = None\n", "path": "modin/experimental/engines/pyarrow_on_ray/io.py"}]}