code: def _compute_max_relative_error(x, y):
      from six.moves import xrange
  
      rerror = 0
      index = 0
      for i in xrange(len(x)):
          den = max(1.0, np.abs(x[i]), np.abs(y[i]))
          if np.abs(x[i] / den - y[i] / den) > rerror:
              rerror = np.abs(x[i] / den - y[i] / den)
              index = i
      return rerror, index
  
file_path: MMdnn/tests/utils.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import os
  import unittest
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_max_relative_error(x, y) and returns: rerror,  index