code: def test_array_vs_matrix(self):
      for A in self.cases:
          assert isinstance(_extract.tril(A), sparray)
          assert isinstance(_extract.triu(A), sparray)
          M = csr_matrix(A)
          assert not isinstance(_extract.tril(M), sparray)
          assert not isinstance(_extract.triu(M), sparray)
  
file_path: scipy/scipy/sparse/tests/test_extract.py
imports: from numpy.testing import assert_equal
  from scipy.sparse import csr_matrix, csr_array, sparray
  import numpy
  from scipy.sparse import _extract
label_desc: Use image node_id 5 for calling the TestExtract obj's underlying member method code with example usage: obj.test_array_vs_matrix() without return types