code: def _before_fit_check(self, X, y):
      # Checking columns to encode
      if self.cols is None:
          self.cols = X.columns
      else:
          assert all(c in X.columns for c in self.cols)
      # Checking input, depending on encoder type
      assert (
          self.__class__.__name__ == "OrdinalEncoder" or y is not None
      )
      if y is not None:
          assert X.shape[0] == y.shape[0]
  
imports: from pandas import DataFrame, Series, unique
  import numpy
  from rich.progress import track
  from sklearn.base import BaseEstimator, TransformerMixin
  from pytorch_tabular.utils import get_logger
label_desc: Use image node_id 5 for calling the BaseEncoder obj's underlying member method code with example usage: obj._before_fit_check(X, y) without return types