code: def test_from_tileable_index():
      t = mt.random.rand(10, 4)
  
      with pytest.raises(ValueError):
          from_tileable(t)
  
      pd_df = pd.DataFrame(
          np.random.rand(10, 4),
          index=np.arange(10, 0, -1).astype(np.int64),
      )
      pd_df.index.name = "ind"
      df = from_pandas_df(pd_df, chunk_size=6)
  
      for o in [df, df[0]]:
          index = o.index
          assert isinstance(index, Int64Index)
          assert index.dtype == np.int64
          assert index.name == pd_df.index.name
          assert isinstance(
              index.index_value.value, IndexValue.Int64Index
          )
  
          index = tile(index)
  
          assert len(index.chunks) == 2
          for c in index.chunks:
              assert c.dtype == np.int64
              assert c.name == pd_df.index.name
              assert isinstance(
                  c.index_value.value, IndexValue.Int64Index
              )
  
      t = mt.random.rand(10, chunk_size=6)
      index = from_tileable(t, name="new_name")
  
      assert isinstance(index, Float64Index)
      assert index.dtype == np.float64
      assert index.name == "new_name"
      assert isinstance(
          index.index_value.value, IndexValue.Float64Index
      )
  
      index = tile(index)
  
      assert len(index.chunks) == 2
      for c in index.chunks:
          assert c.dtype == np.float64
          assert c.name == "new_name"
          assert isinstance(
              c.index_value.value, IndexValue.Float64Index
          )
  
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 5 for calling a global function with example usage: test_from_tileable_index() without return types