def assert_almost_equal(left, right, check_dtype="<STR_LIT>",<EOL>check_less_precise=False, **kwargs):
if isinstance(left, pd.Index):<EOL><INDENT>return assert_index_equal(left, right,<EOL>check_exact=False,<EOL>exact=check_dtype,<EOL>check_less_precise=check_less_precise,<EOL>**kwargs)<EOL><DEDENT>elif isinstance(left, pd.Series):<EOL><INDENT>return assert_series_equal(left, right,<EOL>check_exact=False,<EOL>check_dtype=check_dtype,<EOL>check_less_precise=check_less_precise,<EOL>**kwargs)<EOL><DEDENT>elif isinstance(left, pd.DataFrame):<EOL><INDENT>return assert_frame_equal(left, right,<EOL>check_exact=False,<EOL>check_dtype=check_dtype,<EOL>check_less_precise=check_less_precise,<EOL>**kwargs)<EOL><DEDENT>else:<EOL><INDENT>if check_dtype:<EOL><INDENT>if is_number(left) and is_number(right):<EOL><INDENT>pass<EOL><DEDENT>elif is_bool(left) and is_bool(right):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if (isinstance(left, np.ndarray) or<EOL>isinstance(right, np.ndarray)):<EOL><INDENT>obj = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>obj = "<STR_LIT>"<EOL><DEDENT>assert_class_equal(left, right, obj=obj)<EOL><DEDENT><DEDENT>return _testing.assert_almost_equal(<EOL>left, right,<EOL>check_dtype=check_dtype,<EOL>check_less_precise=check_less_precise,<EOL>**kwargs)<EOL><DEDENT>
Check that the left and right objects are approximately equal.

By approximately equal, we refer to objects that are numbers or that
contain numbers which may be equivalent to specific levels of precision.

Parameters
----------
left : object
right : object
check_dtype : bool / string {'equiv'}, default 'equiv'
    Check dtype if both a and b are the same type. If 'equiv' is passed in,
    then `RangeIndex` and `Int64Index` are also considered equivalent
    when doing type checking.
check_less_precise : bool or int, default False
    Specify comparison precision. 5 digits (False) or 3 digits (True)
    after decimal points are compared. If int, then specify the number
    of digits to compare.

    When comparing two numbers, if the first number has magnitude less
    than 1e-5, we compare the two numbers directly and check whether
    they are equivalent within the specified precision. Otherwise, we
    compare the **ratio** of the second number to the first number and
    check whether it is equivalent to 1 within the specified precision.