code: def _in_sample_abs_seasonal_error(
      *, y_past: pd.Series, seasonal_period: int = 1
  ) -> pd.Series:
      """Compute seasonal naive forecast error (predict value from seasonal_period steps ago) for each time series."""
      seasonal_diffs = _get_seasonal_diffs(
          y_past=y_past, seasonal_period=seasonal_period
      )
      return (
          seasonal_diffs.groupby(level=ITEMID, sort=False)
          .mean()
          .fillna(1.0)
      )
  
imports: import pandas
  from autogluon.timeseries.dataset.ts_dataframe import ITEMID
label_desc: Use image node_id 2 for calling a global function with example usage: _in_sample_abs_seasonal_error() and returns: seasonal_diffs