code: def smape(target: np.ndarray, forecast: np.ndarray) -> float:
      r"""
      .. math::
  
          smape = 2 * mean(|Y - \hat{Y}| / (|Y| + |\hat{Y}|))
  
      See [HA21]_ for more details.
      """
      return 2 * np.mean(
          np.abs(target - forecast)
          / (np.abs(target) + np.abs(forecast))
      )
  
file_path: gluonts/src/gluonts/evaluation/metrics.py
imports: from typing import Optional
  import numpy
  from gluonts.time_feature import get_seasonality
label_desc: Use image node_id 8 for calling a global function with example usage: smape(target, forecast) and returns: unknown