code: def assert_almost_equal(
      actual, desired, decimal=7, err_msg="", verbose=True
  ):
      """
      Asserts that two items are almost equal.
  
      The test is equivalent to abs(desired-actual) < 0.5 * 10**(-decimal).
  
      """
      if isinstance(actual, np.ndarray) or isinstance(
          desired, np.ndarray
      ):
          return assert_array_almost_equal(
              actual,
              desired,
              decimal=decimal,
              err_msg=err_msg,
              verbose=verbose,
          )
      msg = build_err_msg(
          [actual, desired], err_msg=err_msg, verbose=verbose
      )
      if not round(abs(desired - actual), decimal) == 0:
          raise AssertionError(msg)
  
imports: import operator
  import numpy
  from numpy import ndarray
  import numpy._core.umath
  import numpy.testing
  from numpy.testing import assert_, assert_allclose, assert_array_almost_equal_nulp, assert_raises, build_err_msg
  from .core import mask_or, getmask, masked_array, nomask, masked, filled
  from unittest import TestCase
label_desc: Use image node_id 7 for calling a global function with example usage: assert_almost_equal(actual, desired, decimal, err_msg, verbose) and returns: assert_array_almost_equal