code: def test_categorical(self, categories, transformed, daskify, ordered):
      cat = pd.Series(
          ["a", "b", "a"],
          dtype=pd.api.types.CategoricalDtype(
              categories=categories, ordered=ordered
          ),
      )
      if daskify:
          cat = dd.from_pandas(cat, npartitions=2)
          transformed = da.from_array(transformed, chunks=(2, 1))
          if daskify == "unknown":
              cat = cat.cat.as_unknown()
  
      a = dpp.LabelEncoder().fit(cat)
  
      if daskify != "unknown":
          assert a.dtype_ == cat.dtype
      np.testing.assert_array_equal(a.classes_, categories)
      result = a.transform(cat)
      da.utils.assert_eq(result, transformed)
  
      inv_transformed = a.inverse_transform(result)
      if daskify:
          # manually set the divisions and reseting index for the test
          inv_transformed = dd.from_pandas(
              inv_transformed.compute().reset_index()[0], npartitions=2
          )
          inv_transformed.name = None
      dd.utils.assert_eq(inv_transformed, cat)
  
imports: import dask
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import pytest
  import sklearn.preprocessing
  from dask.array.utils import assert_eq
  import dask_ml.preprocessing
  from dask_ml.utils import assert_estimator_equal
label_desc: Use image node_id 7 for calling the TestLabelEncoder obj's underlying member method code with example usage: obj.test_categorical(categories, transformed, daskify, ordered) without return types