code: def test_elementwise_rmul(A):
      with pytest.raises(TypeError):
          None * A
  
      with pytest.raises(ValueError):
          np.eye(3) * scipy.sparse.csr_array(np.arange(6).reshape(2, 3))
  
      assert np.all((2 * A) == (A.todense() * 2))
  
      assert np.all((A.todense() * A) == (A.todense() ** 2))
  
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 9 for calling a global function with example usage: test_elementwise_rmul(A) without return types