code: def test_sparse_dot_execution(setup):
      rs = np.random.RandomState(0)
  
      a_data = sps.random(5, 9, density=0.1)
      b_data = sps.random(9, 10, density=0.2)
      a = tensor(a_data, chunk_size=2)
      b = tensor(b_data, chunk_size=3)
  
      c = dot(a, b)
  
      res = c.execute().fetch()
      assert issparse(res) is True
      np.testing.assert_allclose(
          res.toarray(), a_data.dot(b_data).toarray()
      )
  
      c2 = dot(a, b, sparse=False)
  
      res = c2.execute().fetch()
      assert issparse(res) is False
      np.testing.assert_allclose(res, a_data.dot(b_data).toarray())
  
      c3 = tensordot(a, b.T, (-1, -1), sparse=False)
  
      res = c3.execute().fetch()
      assert issparse(res) is False
      np.testing.assert_allclose(res, a_data.dot(b_data).toarray())
  
      c = inner(a, b.T)
  
      res = c.execute().fetch()
      assert issparse(res) is True
      np.testing.assert_allclose(
          res.toarray(), a_data.dot(b_data).toarray()
      )
  
      c = inner(a, b.T, sparse=False)
  
      res = c.execute().fetch()
      assert issparse(res) is False
      np.testing.assert_allclose(res, a_data.dot(b_data).toarray())
  
      # test vector inner
      a_data = rs.rand(5)
      b_data = rs.rand(5)
      a = tensor(a_data, chunk_size=2).tosparse()
      b = tensor(b_data, chunk_size=2).tosparse()
  
      c = inner(a, b)
  
      res = c.execute().fetch()
      assert np.isscalar(res) is True
      np.testing.assert_allclose(res, np.inner(a_data, b_data))
  
imports: import numpy
  import scipy.sparse
  from ....learn.datasets.samples_generator import make_low_rank_matrix
  from ....lib.sparse import issparse, SparseNDArray
  from ....utils import ignore_warning
  from ...datasource import tensor, diag, ones, arange
  from ...random import uniform
  from ..None import qr, svd, cholesky, norm, lu, solve_triangular, solve, inv, tensordot, dot, inner, vdot, matmul, randomized_svd
label_desc: Use image node_id 12 for calling a global function with example usage: test_sparse_dot_execution(setup) without return types