code: def ape(y, p):
      """Absolute Percentage Error (APE).
      Args:
          y (float): target
          p (float): prediction
  
      Returns:
          e (float): APE
      """
  
      assert np.abs(y) > EPS
      return np.abs(1 - p / y)
  
file_path: causalml/causalml/metrics/regression.py
imports: import logging
  import numpy
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import r2_score
  from .const import EPS
label_desc: Use image node_id 1 for calling a global function with example usage: ape(y, p) and returns: np