def assert_extension_array_equal(left, right, check_dtype=True,<EOL>check_less_precise=False,<EOL>check_exact=False):
assert isinstance(left, ExtensionArray), '<STR_LIT>'<EOL>assert isinstance(right, ExtensionArray), '<STR_LIT>'<EOL>if check_dtype:<EOL><INDENT>assert_attr_equal('<STR_LIT>', left, right, obj='<STR_LIT>')<EOL><DEDENT>if hasattr(left, "<STR_LIT>") and type(right) == type(left):<EOL><INDENT>assert_numpy_array_equal(left.asi8, right.asi8)<EOL>return<EOL><DEDENT>left_na = np.asarray(left.isna())<EOL>right_na = np.asarray(right.isna())<EOL>assert_numpy_array_equal(left_na, right_na, obj='<STR_LIT>')<EOL>left_valid = np.asarray(left[~left_na].astype(object))<EOL>right_valid = np.asarray(right[~right_na].astype(object))<EOL>if check_exact:<EOL><INDENT>assert_numpy_array_equal(left_valid, right_valid, obj='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>_testing.assert_almost_equal(left_valid, right_valid,<EOL>check_dtype=check_dtype,<EOL>check_less_precise=check_less_precise,<EOL>obj='<STR_LIT>')<EOL><DEDENT>
Check that left and right ExtensionArrays are equal.

    Parameters
    ----------
    left, right : ExtensionArray
        The two arrays to compare
    check_dtype : bool, default True
        Whether to check if the ExtensionArray dtypes are identical.
    check_less_precise : bool or int, default False
        Specify comparison precision. Only used when check_exact is False.
        5 digits (False) or 3 digits (True) after decimal points are compared.
        If int, then specify the digits to compare.
    check_exact : bool, default False
        Whether to compare number exactly.

    Notes
    -----
    Missing values are checked separately from valid values.
    A mask of missing values is computed for each and checked to match.
    The remaining all-valid values are cast to object dtype and checked.