code: def test_categorical_params():
      raw = np.random.rand(10)
      cate = cut(raw, [0.3, 0.5, 0.7])
      cate = tile(cate)
      c = cate.chunks[0]
  
      c.params = c.get_params_from_data(pd.cut(raw, [0.3, 0.5, 0.7]))
      assert len(c.params["categories_value"].to_pandas()) > 0
  
      params = c.params.copy()
      params.pop("index", None)
      cate.params = params
      assert len(cate.params["categories_value"].to_pandas()) > 0
      cate.refresh_params()
  
file_path: mars/mars/dataframe/tests/test_core.py
imports: import numpy
  import pandas
  import pytest
  from ...core import tile
  from ...lib.groupby_wrapper import wrapped_groupby
  from ...utils import pd_release_version
  from ..None import cut
  from ..initializer import DataFrame, Series, Index
label_desc: Use image node_id 4 for calling a global function with example usage: test_categorical_params() without return types