code: def compare_metric(func, y, t, outputs, deriv=False, tol=0.0):
      be = NervanaObject.be
      dtypeu = np.float32
      temp = func(be.array(dtypeu(y)), be.array(dtypeu(t)))
      cond = np.sum(np.abs(temp - outputs) <= tol)
      assert cond == np.prod(outputs.shape)
  
imports: import itertools
  import numpy
  from neon import NervanaObject
  from neon.backends import gen_backend
  from neon.transforms import CrossEntropyBinary, CrossEntropyMulti, SumSquared, MeanSquared, Misclassification, PrecisionRecall, SmoothL1Loss, SquareHingeLoss
label_desc: Use image node_id 15 for calling a global function with example usage: compare_metric(func, y, t, outputs, deriv, tol) without return types