code: def _assert_close(value1, value2, threshold, err_msg=""):
      np.testing.assert_allclose(
          value1,
          value2,
          atol=threshold,
          rtol=threshold,
          err_msg=err_msg,
      )
  
      delta = np.abs(value1 - value2).flatten()
      return np.mean(delta), max(delta)
  
file_path: pytorch/caffe2/python/gradient_checker.py
imports: import os
  import numpy
  from caffe2.python import core, workspace, net_drawer
  from caffe2.proto import caffe2_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _assert_close(value1, value2, threshold, err_msg) and returns: np,  max