class_docstr: The `DictMapper` transformer maps the values of columns according to the input `mapper` dictionary, fall back to
  the `default` value if the key is not present in the dictionary.
  
  Parameters
  ----------
  mapper : dict[..., int]
      The dictionary containing the mapping of the values.
  default : int
      The value to fall back to if the value is not in the mapper.
  
  Attributes
  ----------
  n_features_in_ : int
      Number of features seen during `fit`.
  dim_ : int
      Deprecated, please use `n_features_in_` instead.
docstr: Checks the input data and records the number of features.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      The data to fit.
  y : array-like of shape (n_samples,), default=None
      Ignored, present for compatibility.
  
  Returns
  -------
  self : DictMapper
      The fitted transformer.
code: def fit(self, X, y=None):
      """Checks the input data and records the number of features.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          The data to fit.
      y : array-like of shape (n_samples,), default=None
          Ignored, present for compatibility.
  
      Returns
      -------
      self : DictMapper
          The fitted transformer.
      """
      X = check_array(
          X,
          copy=True,
          estimator=self,
          force_all_finite=True,
          dtype=None,
          ensure_2d=True,
      )
      self.n_features_in_ = X.shape[1]
      return self
  
file_path: scikit-lego/sklego/preprocessing/dictmapper.py
imports: from warnings import warn
  import numpy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 2 for calling the DictMapper obj's underlying member method code with example usage: obj.fit(X, y) and returns: self