def assert_almost_equal(actual, desired, decimal=<NUM_LIT:7>, err_msg='<STR_LIT>', verbose=True):
if isinstance(actual, np.ndarray) or isinstance(desired, np.ndarray):<EOL><INDENT>return assert_array_almost_equal(actual, desired, decimal=decimal,<EOL>err_msg=err_msg, verbose=verbose)<EOL><DEDENT>msg = build_err_msg([actual, desired],<EOL>err_msg=err_msg, verbose=verbose)<EOL>if not round(abs(desired - actual), decimal) == <NUM_LIT:0>:<EOL><INDENT>raise AssertionError(msg)<EOL><DEDENT>
Asserts that two items are almost equal.
    The test is equivalent to abs(desired-actual) < 0.5 * 10**(-decimal)