code: def test_SparseTensorType_constructor():
      st = SparseTensorType("csc", "float64")
      assert st.format == "csc"
      assert st.shape == (None, None)
  
      st = SparseTensorType("bsr", "float64", shape=(None, 1))
      assert st.format == "bsr"
      assert st.shape == (None, 1)
  
      with pytest.raises(ValueError):
          SparseTensorType("blah", "float64")
  
file_path: pytensor/tests/sparse/test_type.py
imports: import pytest
  import scipy
  from pytensor.sparse import matrix
  from pytensor.sparse.type import SparseTensorType
  from pytensor.tensor import dmatrix
label_desc: Use image node_id 1 for calling a global function with example usage: test_SparseTensorType_constructor() without return types