code: def check_X_y(
      X,
      y,
      enforce_univariate=False,
      enforce_min_instances=1,
      enforce_min_columns=1,
      coerce_to_numpy=False,
      coerce_to_pandas=False,
  ):
      """Validate input data.
  
      Parameters
      ----------
      X : pd.DataFrame
      y : pd.Series or np.array
      enforce_univariate : bool, optional (default=False)
          Enforce that X is univariate.
      enforce_min_instances : int, optional (default=1)
          Enforce minimum number of instances.
      enforce_min_columns : int, optional (default=1)
          Enforce minimum number of columns (or time-series variables).
      coerce_to_numpy : bool, optional (default=False)
          If True, X will be coerced to a 3-dimensional numpy array.
      coerce_to_pandas : bool, optional (default=False)
          If True, X will be coerced to a nested pandas DataFrame.
  
      Returns
      -------
      X : pd.DataFrame or np.array
      y : pd.Series
      Raises
      ------
      ValueError
          If y or X is invalid input data
      """
      # Since we check for consistent lengths, it's enough to
      # only check y for the minimum number of instances
      y = check_y(y, coerce_to_numpy=coerce_to_numpy)
      check_consistent_length(X, y)
  
      X = check_X(
          X,
          enforce_univariate=enforce_univariate,
          enforce_min_columns=enforce_min_columns,
          enforce_min_instances=enforce_min_instances,
          coerce_to_numpy=coerce_to_numpy,
          coerce_to_pandas=coerce_to_pandas,
      )
      return X, y
  
file_path: sktime/sktime/utils/validation/panel.py
imports: import numpy
  import pandas
  from sklearn.utils.validation import check_consistent_length
  from sktime.datatypes._panel._check import is_nested_dataframe
  from sktime.datatypes._panel._convert import from_3d_numpy_to_nested, from_nested_to_3d_numpy
label_desc: Use image node_id 3 for calling a global function with example usage: check_X_y(X, y, enforce_univariate, enforce_min_instances, enforce_min_columns, coerce_to_numpy, coerce_to_pandas) and returns: X,  y