code: def fit_transform(self, X, y=None, **fit_params):
          
          y = column_or_1d(X, warn=True)
          _check_numpy_unicode_bug(X)
          self.classes_, X = np.unique(X, return_inverse=True)
          return X
docs: Fit label encoder and return encoded labels
  
          Parameters
          ----------
          y : array-like of shape [n_samples]
              Target values.
  
          Returns
          -------
          y : array-like of shape [n_samples]