code: def assert_csr_matrix_equal(x, y):
      if x.shape != y.shape:
          raise AssertionError(
              f"Shape mismatch x: {x.shape} / y: {y.shape}"
          )
  
      assert_array_equal(x.data, y.data)
      assert_array_equal(x.indices, y.indices)
      assert_array_equal(x.indptr, y.indptr)
  
file_path: small-text/tests/utils/testing.py
imports: import numpy
  from scipy.sparse import csr_matrix
  from numpy.testing import assert_array_equal, assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: assert_csr_matrix_equal(x, y) without return types