code: def test_CheckAndRaise_validation():
      with pytest.raises(ValueError):
          CheckAndRaise(str)
  
      g1 = assert_op(np.array(1.0))
      assert isinstance(g1.owner.inputs[0], Constant)
  
imports: import numpy
  import pytest
  import scipy.sparse
  import pytensor
  import pytensor.tensor
  from pytensor.compile.mode import OPT_FAST_RUN, Mode
  from pytensor.graph import vectorize_graph
  from pytensor.graph.basic import Constant, equal_computations
  from pytensor.raise_op import Assert, CheckAndRaise, assert_op
  from pytensor.scalar.basic import ScalarType, float64
  from pytensor.sparse import as_sparse_variable
  from pytensor.tensor.basic import second
  from pytensor.tensor.elemwise import DimShuffle
  from tests import unittest_tools
label_desc: Use image node_id 4 for calling a global function with example usage: test_CheckAndRaise_validation() without return types