code: def test_read_sql_use_arrow_dtype(setup):
      rs = np.random.RandomState(0)
      test_df = pd.DataFrame(
          {
              "a": np.arange(10).astype(np.int64, copy=False),
              "b": [f"s{i}" for i in range(10)],
              "c": rs.rand(10),
              "d": [
                  datetime.fromtimestamp(time.time() + 3600 * (i - 5))
                  for i in range(10)
              ],
          }
      )
  
      with tempfile.TemporaryDirectory() as d:
          table_name = "test"
          uri = "sqlite:///" + os.path.join(d, "test.db")
  
          test_df.to_sql(table_name, uri, index=False)
  
          r = md.read_sql_table(
              "test", uri, chunk_size=4, use_arrow_dtype=True
          )
          result = r.execute().fetch()
          assert isinstance(r.dtypes.iloc[1], md.ArrowStringDtype)
          assert isinstance(result.dtypes.iloc[1], md.ArrowStringDtype)
          pd.testing.assert_frame_equal(
              arrow_array_to_objects(result), test_df
          )
  
          # test read with sql string and offset method
          r = md.read_sql_query(
              "select * from test where c > 0.5",
              uri,
              parse_dates=["d"],
              chunk_size=4,
              use_arrow_dtype=True,
          )
          result = r.execute().fetch()
          assert isinstance(r.dtypes.iloc[1], md.ArrowStringDtype)
          assert isinstance(result.dtypes.iloc[1], md.ArrowStringDtype)
          pd.testing.assert_frame_equal(
              arrow_array_to_objects(result),
              test_df[test_df.c > 0.5].reset_index(drop=True),
          )
  
imports: import itertools
  import os
  import tempfile
  import time
  from collections import OrderedDict
  from datetime import datetime
  from string import printable
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....None import dataframe
  from ....config import option_context
  from ....tests.core import require_cudf, require_ray
  from ....utils import arrow_array_to_objects, lazy_import, pd_release_version
  from ...utils import ray_deprecate_ml_dataset
  from ..dataframe import from_pandas
  from ..series import from_pandas
  from ..index import from_pandas, from_tileable
  from ..from_tensor import dataframe_from_tensor, dataframe_from_1d_tileables
  from ..from_records import from_records
label_desc: Use image node_id 16 for calling a global function with example usage: test_read_sql_use_arrow_dtype(setup) without return types