code: def mape(target: np.ndarray, forecast: np.ndarray) -> float:
      r"""
      .. math::
  
          mape = mean(|Y - \hat{Y}| / |Y|))
  
      See [HA21]_ for more details.
      """
      return np.mean(np.abs(target - forecast) / np.abs(target))
  
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 7 for calling a global function with example usage: mape(target, forecast) and returns: np