code: def svm_array_equal(
      a, b, tol=1e-6, relative_diff=True, report_summary=False
  ):
      diff = np.abs(a - b)
      if relative_diff:
          idx = np.nonzero(abs(b) > tol)
          diff[idx] = diff[idx] / abs(b[idx])
      equal = np.all(diff <= tol)
      if not equal and report_summary:
          idx = np.argsort(diff)
          print("Largest diffs")
          a = a.ravel()
          b = b.ravel()
          diff = diff.ravel()
          for i in idx[-5:]:
              if diff[i] > tol:
                  print(diff[i], "at", i, "values", a[i], b[i])
          print(
              "Avgdiff:",
              np.mean(diff),
              "stddiyy:",
              np.std(diff),
              "avgval:",
              np.mean(b),
          )
      return equal
  
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 26 for calling a global function with example usage: svm_array_equal(a, b, tol, relative_diff, report_summary) and returns: equal