code: def assert_array_equal(
      a, b, unit_tol=1e-4, total_tol=1e-4, with_sign=True
  ):
      """
      Raises an AssertionError if arrays are not considered equal.
  
      Uses the same arguments as array_equal(), but raises an AssertionError in
      case that the test considers the arrays to not be equal.
  
      This function will generate a nicer error message in the context of pytest
      compared to a plain `assert array_equal(...)`.
      """
      # Determine array equality.
      equal = array_equal(
          a,
          b,
          unit_tol=unit_tol,
          total_tol=total_tol,
          with_sign=with_sign,
      )
      if not equal:
          # Generate indented array string representation ...
          str_a = indent(np.array2string(a), "   ").splitlines()
          str_b = indent(np.array2string(b), "   ").splitlines()
          # ... and add labels
          str_a[0] = f"a: {str_a[0][3:]}"
          str_b[0] = f"b: {str_b[0][3:]}"
  
          # Create assertion error message and raise exception.
          assertion_error_msg = (
              dedent(
                  f"""
          Arrays are not equal
  
          unit_tol:  {unit_tol}
          total_tol: {total_tol}
          with_sign: {with_sign}
  
          """
              )
              + "\n".join(str_a + str_b)
          )
          raise AssertionError(assertion_error_msg)
  
imports: import pytest
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.input_utils import input_to_cuml_array, is_array_like
  from cuml.internals.base import Base
  import cuml
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import mean_squared_error, brier_score_loss
  from sklearn.datasets import make_classification, make_regression
  from sklearn import datasets
  from pylibraft.common.cuda import Stream
  from sklearn.datasets import make_regression
  from numba.cuda.cudadrv.devicearray import DeviceNDArray
  from numbers import Number
  from cuml.internals.safe_imports import gpu_only_import_from
  from itertools import dropwhile
  from copy import deepcopy
  from cuml.internals.safe_imports import cpu_only_import
  import inspect
  from textwrap import dedent, indent
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: assert_array_equal(a, b, unit_tol, total_tol, with_sign) without return types