code: def test_read_sql():
      test_df = pd.DataFrame(
          {
              "a": np.arange(10).astype(np.int64, copy=False),
              "b": [f"s{i}" 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)
  
          df = read_sql_table(table_name, uri, chunk_size=4)
  
          assert df.shape == test_df.shape
          pd.testing.assert_index_equal(
              df.index_value.to_pandas(), test_df.index
          )
          pd.testing.assert_series_equal(df.dtypes, test_df.dtypes)
  
          df = tile(df)
          assert df.nsplits == ((4, 4, 2), (2,))
          for c in df.chunks:
              assert isinstance(c.op, DataFrameReadSQL)
              assert c.op.offset is not None
  
          with pytest.raises(NotImplementedError):
              read_sql_table(
                  table_name, uri, chunksize=4, index_col=b"a"
              )
          with pytest.raises(TypeError):
              read_sql_table(
                  table_name, uri, chunk_size=4, index_col=b"a"
              )
          with pytest.raises(TypeError):
              read_sql_query(
                  "select * from " + table_name, uri, partition_col="b"
              )
  
imports: import os
  import tempfile
  import shutil
  import string
  from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....config import option_context
  from ....core import tile
  from ....tests.core import require_ray
  from ....utils import lazy_import
  from ...core import IndexValue, DatetimeIndex, Int64Index, Float64Index, MultiIndex
  from ..core import merge_small_files
  from ..dataframe import from_pandas
  from ..date_range import date_range
  from ..from_records import from_records
  from ..from_tensor import dataframe_from_tensor, series_from_tensor, dataframe_from_1d_tileables
  from ..index import from_pandas, from_tileable
  from ..read_csv import read_csv, DataFrameReadCSV
  from ..read_sql import read_sql_table, read_sql_query, DataFrameReadSQL
  from ..read_raydataset import read_ray_dataset, DataFrameReadRayDataset, read_ray_mldataset, DataFrameReadMLDataset
  from ...utils import ray_deprecate_ml_dataset
  from ..series import from_pandas
label_desc: Use image node_id 9 for calling a global function with example usage: test_read_sql() without return types