code: def mape(y, p):
      r"""Mean Average Percentage Error.
  
      .. math::
  
          MAPE(\mathbf{y}, \mathbf{p}) =
          |S| \sum_{i \in S} | \frac{y_i - p_i}{y_i} |
  
      Parameters
      ----------
      y : array-like of shape [n_samples, ]
          ground truth.
  
      p : array-like of shape [n_samples, ]
          predicted labels.
  
      Returns
      -------
      z: float
          mean average percentage error.
      """
      return np.mean(np.divide(np.abs((y - p)), np.abs(y)))
  
imports: from __future__ import division
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: mape(y, p) and returns: np