class_docstr: Base class for interfacing StatsForecast.
docstr: Generate in sample predictions.
  
  Parameters
  ----------
  fh : array-like
      The forecasters horizon with the steps ahead to to predict.
      Default is
      one-step ahead forecast, i.e. np.array([1]).
  
  Returns
  -------
  y_pred : pandas.Series
      Returns series of predicted values.
code: def _predict_in_sample(
      self, fh, X=None, return_pred_int=False, alpha=DEFAULT_ALPHA
  ):
      """Generate in sample predictions.
  
      Parameters
      ----------
      fh : array-like
          The forecasters horizon with the steps ahead to to predict.
          Default is
          one-step ahead forecast, i.e. np.array([1]).
  
      Returns
      -------
      y_pred : pandas.Series
          Returns series of predicted values.
      """
      # initialize return objects
      fh_abs = fh.to_absolute(self.cutoff).to_numpy()
      fh_idx = fh.to_indexer(self.cutoff, from_cutoff=True)
      y_pred = pd.Series(index=fh_abs, dtype="float64")
  
      result = self._forecaster.predict_in_sample()
      y_pred.loc[fh_abs] = result["mean"].values[fh_idx]
  
      if return_pred_int:
          pred_ints = []
          for a in alpha:
              pred_int = pd.DataFrame(
                  index=fh_abs, columns=["lower", "upper"]
              )
              result = self._forecaster.predict_in_sample(
                  level=int(100 * a)
              )
              pred_int.loc[fh_abs] = result.drop("mean", axis=1).values[
                  fh_idx, :
              ]
              pred_ints.append(pred_int)
          return y_pred, pred_ints
  
      return y_pred
  
file_path: sktime/sktime/forecasting/base/adapters/_statsforecast.py
imports: import pandas
  from sktime.forecasting.base import BaseForecaster
  from sktime.forecasting.base._base import DEFAULT_ALPHA
label_desc: Use image node_id 5 for calling the _StatsForecastAdapter obj's underlying member method code with example usage: obj._predict_in_sample(fh, X, return_pred_int, alpha) and returns: y_pred, y_pred,  pred_ints