code: def seasonal_error(
      time_series: np.ndarray, seasonality: int, time_axis=0
  ) -> np.ndarray:
      """The mean abs. difference of a time series, shifted by its seasonality.
  
      Some metrics use the seasonal error for normalization."""
  
      time_length = time_series.shape[time_axis]
  
      if seasonality > time_length:
          seasonality = 1
  
      y_t = np.take(
          time_series, range(seasonality, time_length), axis=time_axis
      )
      y_tm = np.take(
          time_series, range(time_length - seasonality), axis=time_axis
      )
  
      return np.abs(y_t - y_tm).mean(axis=time_axis, keepdims=True)
  
label_desc: Use image node_id 1 for calling a global function with example usage: seasonal_error(time_series, seasonality, time_axis) and returns: np