code: def _check_X_matches_training_df(
      X: pd.DataFrame, reference: int
  ) -> None:
      """
      Checks that DataFrame to transform has the same number of columns that the
      DataFrame used with the fit() method.
  
      Parameters
      ----------
      X : Pandas DataFrame
          The df to be checked
      reference : int
          The number of columns in the dataframe that was used with the fit() method.
  
      Raises
      ------
      ValueError
          If the number of columns does not match.
  
      Returns
      -------
      None
      """
  
      if X.shape[1] != reference:
          raise ValueError(
              "The number of columns in this dataset is different from the one used to "
              "fit this transformer (when using the fit() method)."
          )
  
      return None
  
file_path: feature_engine/feature_engine/dataframe_checks.py
imports: from typing import List, Tuple, Union
  import numpy
  import pandas
  from scipy.sparse import issparse
  from sklearn.utils.validation import _check_y, check_consistent_length
label_desc: Use image node_id 4 for calling a global function with example usage: _check_X_matches_training_df(X, reference) and returns: None