code: def within_tolerance(x, y):
      "Function to indicate acceptable level of tolerance in numerical differences"
  
      # as the np.allcose function is not symmetric,
      # this ensurers second arg is larger
      if x < y:
          smaller = x
          larger = y
      else:
          smaller = y
          larger = x
  
      # atol=np.finfo(float).eps is super strict, choosing 1e-3
      # rtol=1e-2 approx. matches two decimal points
      return bool(np.allclose(smaller, larger, rtol=1e-2, atol=1e-3))
  
file_path: medpy/tests/metric_/histogram.py
imports: import numpy
  from hypothesis import given, strategies, assume, Verbosity, note, event
  from hypothesis import settings
  from medpy.metric import histogram
label_desc: Use image node_id 1 for calling a global function with example usage: within_tolerance(x, y) and returns: bool