class_docstr: shared set-up checks and methods across outlier transformers
class_docstr_tok: ["shared","set-up","checks","and","methods","across","outlier","transformers"]
docstr: Checks that the input is a dataframe and of the same size than the one used
  in the fit method. Checks absence of NA.
  
  Parameters
  ----------
  X: Pandas DataFrame
  
  Raises
  ------
  TypeError
      If the input is not a Pandas DataFrame
  ValueError
      If the dataframe is not of same size as that used in fit()
  
  Returns
  -------
  X: Pandas DataFrame
      The same dataframe entered by the user.
docstr_tok: ["Checks","that","the","input","is","a","dataframe","and","of","the","same","size","than","the","one","used","in","the","fit","method",".","Checks","absence","of","NA",".","Parameters","--","--","--","--","--","X",":","Pandas","DataFrame","Raises","--","--","--","TypeError","If","the","input","is","not","a","Pandas","DataFrame","ValueError","If","the","dataframe","is","not","of","same","size","as","that","used","in","fit","(",")","Returns","--","--","--","-","X",":","Pandas","DataFrame","The","same","dataframe","entered","by","the","user","."]
code: def _check_transform_input_and_state(
      self, X: pd.DataFrame
  ) -> pd.DataFrame:
      """Checks that the input is a dataframe and of the same size than the one used
      in the fit method. Checks absence of NA.
  
      Parameters
      ----------
      X: Pandas DataFrame
  
      Raises
      ------
      TypeError
          If the input is not a Pandas DataFrame
      ValueError
          If the dataframe is not of same size as that used in fit()
  
      Returns
      -------
      X: Pandas DataFrame
          The same dataframe entered by the user.
      """
      # check if class was fitted
      check_is_fitted(self)
  
      # check that input is a dataframe
      X = check_X(X)
  
      # Check that the dataframe contains the same number of columns
      # than the dataframe used to fit the imputer.
      _check_X_matches_training_df(X, self.n_features_in_)
  
      if self.missing_values == "raise":
          # check if dataset contains na
          _check_contains_na(X, self.variables_)
          _check_contains_inf(X, self.variables_)
  
      # reorder to match training set
      X = X[self.feature_names_in_]
  
      return X
  
imports: from typing import List, Optional, Union
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.validation import check_is_fitted
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine._variable_handling.variable_type_selection import _find_or_check_numerical_variables
  from feature_engine.dataframe_checks import _check_contains_inf, _check_contains_na, _check_X_matches_training_df, check_X
  from feature_engine._base_transformers.mixins import GetFeatureNamesOutMixin
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 for calling the BaseOutlier obj's underlying member method code with example usage: obj._check_transform_input_and_state(X) and returns: X