code: def check_is_dataframe_input(func):
      @functools.wraps(func)
      def wrapper(*args, **kwargs):
          X = args[
              1
          ]  # Assuming the first argument is 'self' or an instance
          if not isinstance(X, pd.DataFrame):
              raise ValueError(
                  f"The X argument must be a pandas DataFrame, but got {type(X).__name__}"
              )
          return func(*args, **kwargs)
  
      return wrapper
  
file_path: prince/prince/utils.py
imports: from __future__ import annotations
  import functools
  import altair
  import numpy
  import pandas
  from sklearn.utils import validation
label_desc: Use image node_id 2 for calling a global function with example usage: check_is_dataframe_input(func) and returns: wrapper, func