class_docstr: Encode categorical integer features as a one-hot numeric array.
  
  The input to this transformer should be an array-like of integers or
  strings, denoting the values taken on by categorical (discrete) features.
  The features are encoded using a one-hot (aka 'one-of-K' or 'dummy')
  encoding scheme. This creates a binary column for each category and
  returns a sparse matrix or dense array (depending on the ``sparse``
  parameter)
  
  By default, the encoder derives the categories based on the unique values
  in each feature. Alternatively, you can also specify the `categories`
  manually.
  
  Always uses handle_unknown='ignore' which maps unknown test-time categories to all zeros vector.
  
  Parameters
  ----------
  categories : 'auto' or a list of lists/arrays of values, default='auto'.
      Categories (unique values) per feature:
  
      - 'auto' : Determine categories automatically from the training data.
      - list : ``categories[i]`` holds the categories expected in the ith
        column. The passed categories should not mix strings and numeric
        values within a single feature, and should be sorted in case of
        numeric values.
  
      The used categories can be found in the ``categories_`` attribute.
  
  drop : 'first' or a list/array of shape (n_features,), default=None.
      Specifies a methodology to use to drop one of the categories per
      feature. This is useful in situations where perfectly collinear
      features cause problems, such as when feeding the resulting data
      into a neural network or an unregularized regression.
  
      - None : retain all features (the default).
      - 'first' : drop the first category in each feature. If only one
        category is present, the feature will be dropped entirely.
      - array : ``drop[i]`` is the category in feature ``X[:, i]`` that
        should be dropped. If ``drop[i]`` is an infrequent category, an
        error is raised: it is only possible to drop all of the infrequent
        categories, not just one of them.
      - 'infrequent' : drop the infrequent categories column (see
        ``max_levels`` parameter).
  
  sparse : boolean, default=True
      Will return sparse matrix if set True else will return an array.
  
  dtype : number type, default=float
      Desired dtype of output.
  
  max_levels : int, default=None
      One less than the maximum number of categories to keep (max_levels = 2 means we keep 3 distinct categories).
      Infrequent categories are grouped together and mapped into a single column, which counts as extra category.
      Unknown categories encountered at test time are mapped to all zeros vector.
  
  Attributes
  ----------
  categories_ : list of arrays
      The categories of each feature determined during fitting
      (in order of the features in X and corresponding with the output
      of ``transform``). This includes the category specified in ``drop``
      (if any).
  
  drop_idx_ : array of shape (n_features,)
      ``drop_idx_[i]`` is the index in ``categories_[i]`` of the category to
      be dropped for each feature. None if all the transformed features will
      be retained.
  
  infrequent_indices_: list of arrays of shape(n_infrequent_categories)
      ``infrequent_indices_[i]`` contains a list of indices in
      ``categories_[i]`` corresponding to the infrequent categories.
code: def _convert_cat_to_int(self, X):
      if self._cat_cols:
          X = copy.deepcopy(X)
          X[self._cat_cols] = self._label_encoder.transform(
              X[self._cat_cols]
          )
      return X
  
imports: import copy
  from numbers import Integral
  import numpy
  from scipy import sparse
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from autogluon.features.generators import LabelEncoderFeatureGenerator
label_desc: Use image node_id 4 for calling the OneHotMergeRaresHandleUnknownEncoder obj's underlying member method code with example usage: obj._convert_cat_to_int(X) and returns: X