code: def tolerant_equals(a, b, atol=10e-9, rtol=10e-9, equal_nan=False):
      """Check if a and b are equal with some tolerance.
  
      Parameters
      ----------
      a, b : float
          The floats to check for equality.
      atol : float, optional
          The absolute tolerance.
      rtol : float, optional
          The relative tolerance.
      equal_nan : bool, optional
          Should NaN compare equal?
  
      See Also
      --------
      numpy.isclose
  
      Notes
      -----
      This function is just a scalar version of numpy.isclose for performance.
      See the docstring of ``isclose`` for more information about ``atol`` and
      ``rtol``.
      """
      if equal_nan and isnan(a) and isnan(b):
          return True
      return math.fabs(a - b) <= (atol + rtol * math.fabs(b))
  
imports: from decimal import Decimal
  import math
  from numpy import isnan
label_desc: Use image node_id 2 for calling a global function with example usage: tolerant_equals(a, b, atol, rtol, equal_nan) and returns: unknown, True