code: def _adapt_y_X(y, X):
      """Adapt fit data to HCB compliant format.
  
      Parameters
      ----------
      y : pd.Series
          Target variable
      X : pd.Series, pd.DataFrame
          Exogenous variables
  
      Returns
      -------
      tuple
          y_train - pd.Series with datetime index
          X_train - pd.DataFrame with datetime index
                    and optionally exogenous variables in columns
  
      Raises
      ------
      ValueError
          When neither of the argument has Datetime or Period index
      """
      index = _check_index(y.index)
      X = pd.DataFrame(index=index) if X is None else X
      return y, X
  
file_path: sktime/sktime/forecasting/adapters/_hcrystalball.py
imports: import pandas
  from sklearn.base import clone
  from sktime.forecasting.base import BaseForecaster
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 3 for calling a global function with example usage: _adapt_y_X(y, X) and returns: y,  X