code: def test_from_records():
      dtype = np.dtype([("x", "int"), ("y", "double"), ("z", "<U16")])
  
      tensor = mt.ones((10,), dtype=dtype, chunk_size=3)
      df = from_records(tensor)
      df = tile(df)
  
      assert df.chunk_shape == (4, 1)
      assert df.chunks[0].shape == (3, 3)
      assert df.chunks[1].shape == (3, 3)
      assert df.chunks[2].shape == (3, 3)
      assert df.chunks[3].shape == (1, 3)
  
      assert df.chunks[0].inputs[0].shape == (3,)
      assert df.chunks[1].inputs[0].shape == (3,)
      assert df.chunks[2].inputs[0].shape == (3,)
      assert df.chunks[3].inputs[0].shape == (1,)
  
      assert df.chunks[0].op.extra_params == {
          "begin_index": 0,
          "end_index": 3,
      }
      assert df.chunks[1].op.extra_params == {
          "begin_index": 3,
          "end_index": 6,
      }
      assert df.chunks[2].op.extra_params == {
          "begin_index": 6,
          "end_index": 9,
      }
      assert df.chunks[3].op.extra_params == {
          "begin_index": 9,
          "end_index": 10,
      }
  
      names = pd.Index(["x", "y", "z"])
      dtypes = pd.Series(
          {
              "x": np.dtype("int"),
              "y": np.dtype("double"),
              "z": np.dtype("<U16"),
          }
      )
      for chunk in df.chunks:
          pd.testing.assert_index_equal(
              chunk.columns_value.to_pandas(), names
          )
          pd.testing.assert_series_equal(chunk.dtypes, dtypes)
  
      pd.testing.assert_index_equal(
          df.chunks[0].index_value.to_pandas(), pd.RangeIndex(0, 3)
      )
      pd.testing.assert_index_equal(
          df.chunks[1].index_value.to_pandas(), pd.RangeIndex(3, 6)
      )
      pd.testing.assert_index_equal(
          df.chunks[2].index_value.to_pandas(), pd.RangeIndex(6, 9)
      )
      pd.testing.assert_index_equal(
          df.chunks[3].index_value.to_pandas(), pd.RangeIndex(9, 10)
      )
  
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 7 for calling a global function with example usage: test_from_records() without return types