code: def test_date_range():
      with pytest.raises(TypeError):
          _ = date_range("2020-1-1", periods="2")
  
      with pytest.raises(ValueError):
          _ = date_range("2020-1-1", "2020-1-10", periods=10, freq="D")
  
      with pytest.raises(ValueError):
          _ = date_range(pd.NaT, periods=10)
  
      expected = pd.date_range("2020-1-1", periods=9.0, name="date")
  
      dr = date_range(
          "2020-1-1", periods=9.0, name="date", chunk_size=3
      )
      assert isinstance(dr, DatetimeIndex)
      assert dr.shape == (9,)
      assert dr.dtype == expected.dtype
      assert isinstance(dr.index_value.value, IndexValue.DatetimeIndex)
      assert dr.index_value.min_val == expected.min()
      assert dr.index_value.min_val_close is True
      assert dr.index_value.max_val == expected.max()
      assert dr.index_value.max_val_close is True
      assert dr.index_value.is_unique == expected.is_unique
      assert (
          dr.index_value.is_monotonic_increasing
          == expected.is_monotonic_increasing
      )
      assert dr.name == expected.name
  
      dr = tile(dr)
  
      for i, c in enumerate(dr.chunks):
          ec = expected[i * 3 : (i + 1) * 3]
          assert c.shape == (3,)
          assert c.dtype == ec.dtype
          assert isinstance(
              c.index_value.value, IndexValue.DatetimeIndex
          )
          assert c.index_value.min_val == ec.min()
          assert c.index_value.min_val_close is True
          assert c.index_value.max_val == ec.max()
          assert c.index_value.max_val_close is True
          assert c.index_value.is_unique == ec.is_unique
          assert (
              c.index_value.is_monotonic_increasing
              == ec.is_monotonic_increasing
          )
          assert c.name == ec.name
  
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 11 for calling a global function with example usage: test_date_range() without return types