code: def check_X(
      X,
      allow_empty=False,
      enforce_univariate=False,
      enforce_index_type=None,
  ):
      """Validate input data.
  
      Parameters
      ----------
      X : pd.Series, pd.DataFrame, np.ndarray
      allow_empty : bool, optional (default=False)
          If False, empty `X` raises an error.
      enforce_index_type : type, optional (default=None)
          type of time index
      enforce_univariate : bool, optional (default=False)
          If True, multivariate X will raise an error.
  
      Returns
      -------
      X : pd.Series, pd.DataFrame
          Validated input data.
  
      Raises
      ------
      ValueError, TypeError
          If X is an invalid input
      UserWarning
          Warning that X is given and model can't use it
      """
      # Check if pandas series or numpy array
      return check_series(
          X,
          enforce_univariate=enforce_univariate,
          allow_empty=allow_empty,
          enforce_index_type=enforce_index_type,
          allow_numpy=False,
      )
  
file_path: sktime/sktime/utils/validation/forecasting.py
imports: from datetime import timedelta
  from typing import Optional, Union
  import numpy
  import pandas
  from sklearn.base import clone, is_regressor
  from sklearn.ensemble import GradientBoostingRegressor
  from sktime.utils.validation import array_is_datetime64, array_is_int, is_date_offset, is_int, is_timedelta
  from sktime.utils.validation.series import check_equal_time_index, check_series
label_desc: Use image node_id 2 for calling a global function with example usage: check_X(X, allow_empty, enforce_univariate, enforce_index_type) and returns: check_series