code: def test_sparse_dot_non_const_raises():
      x_pt = pt.vector("x")
  
      y_sp = scipy.sparse.random(
          40, 3, density=0.25, format="csc", dtype="float32"
      )
      y_pt = ps.as_sparse_variable(y_sp, name="y").type()
  
      out = ps.dot(x_pt, y_pt)
  
      msg = "JAX sparse dot only implemented for constant sparse inputs"
  
      with pytest.raises(NotImplementedError, match=msg):
          function([x_pt, y_pt], out, mode="JAX")
  
      y_pt_shared = ps.shared(y_sp, name="y")
  
      out = ps.dot(x_pt, y_pt_shared)
  
      with pytest.raises(NotImplementedError, match=msg):
          function([x_pt], out, mode="JAX")
  
file_path: pytensor/tests/link/jax/test_sparse.py
imports: import numpy
  import pytest
  import scipy.sparse
  import pytensor.sparse
  import pytensor.tensor
  from pytensor import function
  from pytensor.graph import FunctionGraph
  from tests.link.jax.test_basic import compare_jax_and_py
label_desc: Use image node_id 2 for calling a global function with example usage: test_sparse_dot_non_const_raises() without return types