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