code: def err_metric(a, b, atol=1e-290):
      m = abs(a - b) / (atol + abs(b))
      m[np.isinf(b) & (a == b)] = 0
      return m
  
imports: import numpy
  import matplotlib.pyplot
  import mpmath
label_desc: Use image node_id 1 for calling a global function with example usage: err_metric(a, b, atol) and returns: m