code: def test_sum(A):
      assert not isinstance(
          A.sum(axis=0), np.matrix
      ), "Expected array, got matrix"
      assert A.sum(axis=0).shape == (4,)
      assert A.sum(axis=1).shape == (3,)
  
imports: import pytest
  import numpy
  import numpy.testing
  import scipy.sparse
  import scipy.sparse.linalg
  from scipy._lib._util import VisibleDeprecationWarning
label_desc: Use image node_id 1 for calling a global function with example usage: test_sum(A) without return types