code: def test_spdot(rng):
      n = 100
      m = 20
      k = 10
      A = rng.standard_normal((n, m))
      B = rng.standard_normal((m, k))
      A_sparse = sps.csr_matrix(A)
      B_sparse = sps.csr_matrix(B)
      dense_dot = np.dot(A, B)
      # Try all the different variations:
      npt.assert_array_almost_equal(
          dense_dot, spdot(A_sparse, B_sparse).todense()
      )
      npt.assert_array_almost_equal(dense_dot, spdot(A, B_sparse))
      npt.assert_array_almost_equal(dense_dot, spdot(A_sparse, B))
  
file_path: dipy/dipy/core/tests/test_optimize.py
imports: import numpy
  import scipy.sparse
  import numpy.testing
  from dipy.core.optimize import Optimizer, sparse_nnls, spdot
  import dipy.core.optimize
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 6 for calling a global function with example usage: test_spdot(rng) without return types