class_docstr: Encode labels with value between 0 and n_classes-1.
  
  .. note::
  
     This differs from the scikit-learn version for Categorical data.
     When passed a categorical `y`, this implementation will use the
     categorical information for the label encoding and transformation.
     You will receive different answers when
  
     1. Your categories are not monotonically increasing
     2. You have unobserved categories
  
     Specify ``use_categorical=False`` to recover the scikit-learn behavior.
  
  Parameters
  ----------
  use_categorical : bool, default True
      Whether to use the categorical dtype information when `y` is a
      dask or pandas Series with a categorical dtype.
  
  Attributes
  ----------
  classes_ : array of shape (n_class,)
      Holds the label for each class.
  dtype_ : Optional CategoricalDtype
      For Categorical `y`, the dtype is stored here.
  
  Examples
  --------
  `LabelEncoder` can be used to normalize labels.
  
  >>> from dask_ml import preprocessing
  >>> le = preprocessing.LabelEncoder()
  >>> le.fit([1, 2, 2, 6])
  LabelEncoder()
  >>> le.classes_
  array([1, 2, 6])
  >>> le.transform([1, 1, 2, 6]) #doctest: +ELLIPSIS
  array([0, 0, 1, 2]...)
  >>> le.inverse_transform([0, 0, 1, 2])
  array([1, 1, 2, 6])
  
  It can also be used to transform non-numerical labels (as long as they are
  hashable and comparable) to numerical labels.
  
  >>> le = preprocessing.LabelEncoder()
  >>> le.fit(["paris", "paris", "tokyo", "amsterdam"])
  LabelEncoder()
  >>> list(le.classes_)
  ['amsterdam', 'paris', 'tokyo']
  >>> le.transform(["tokyo", "tokyo", "paris"]) #doctest: +ELLIPSIS
  array([2, 2, 1]...)
  >>> list(le.inverse_transform([2, 2, 1]))
  ['tokyo', 'tokyo', 'paris']
  
  When using Dask, we strongly recommend using a Categorical dask Series if
  possible. This avoids a (potentially expensive) scan of the values and
  enables a faster `transform` algorithm.
  
  >>> import dask.dataframe as dd
  >>> import pandas as pd
  >>> data = dd.from_pandas(pd.Series(['a', 'a', 'b'], dtype='category'),
  ...                       npartitions=2)
  >>> le.fit_transform(data)
  dask.array<values, shape=(nan,), dtype=int8, chunksize=(nan,)>
  >>> le.fit_transform(data).compute()
  array([0, 0, 1], dtype=int8)
code: def inverse_transform(self, y: Union[ArrayLike, SeriesType]):
      check_is_fitted(self, "classes_")
      y = self._check_array(y)
  
      if isinstance(y, da.Array):
          if getattr(self, "dtype_", None):
              # -> Series[category]
              if self.dtype_ is not None:
                  result = (
                      dd.from_dask_array(y)
                      .astype("category")
                      .cat.set_categories(np.arange(len(self.classes_)))
                      .cat.rename_categories(self.dtype_.categories)
                  )
              if self.dtype_.ordered:
                  result = result.cat.as_ordered()
              return result
          else:
              return da.map_blocks(
                  getitem,
                  self.classes_,
                  y,
                  dtype=self.classes_.dtype,
                  chunks=y.chunks,
              )
      else:
          y = np.asarray(y)
          if getattr(self, "dtype_", None):
              if self.dtype_ is not None:
                  return pd.Series(
                      pd.Categorical.from_codes(
                          y,
                          categories=self.dtype_.categories,
                          ordered=self.dtype_.ordered,
                      )
                  )
          else:
              return self.classes_[y]
  
imports: from __future__ import division
  from operator import getitem
  from typing import Optional, Union
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import scipy.sparse
  import sklearn.preprocessing
  from sklearn.utils.validation import check_is_fitted
  from .._typing import ArrayLike, SeriesType
label_desc: Use image node_id 6 for calling the LabelEncoder obj's underlying member method code with example usage: obj.inverse_transform(y) and returns: result, da, self, pd