code: def compare_arrays(array1, array2):
      if hasattr(array1, "toarray"):
          array1 = array1.toarray()
      if hasattr(array2, "toarray"):
          array2 = array2.toarray()
      np.testing.assert_almost_equal(array1, array2)
  
imports: import unittest
  import numpy
  from numpy.linalg import norm
  from tick.array_test.build import array_test
  from scipy.sparse import csr_matrix
  import itertools
label_desc: Use image node_id 8 for calling the Test obj's underlying member method code with example usage: obj.compare_arrays(array1, array2) without return types