class_docstr: Implements assertion in a computational graph.
  
  Returns the first parameter if the condition is ``True``; otherwise,
  triggers `AssertionError`.
  
  Notes
  -----
  This `Op` is a debugging feature. It can be removed from the graph
  because of optimizations, and can hide some possible optimizations to
  the optimizer. Specifically, removing happens if it can be determined
  that condition will always be true. Also, the output of the Op must be
  used in the function computing the graph, but it doesn't have to be
  returned.
  
  Examples
  --------
  >>> import pytensor
  >>> import pytensor.tensor as pt
  >>> from pytensor.raise_op import Assert
  >>> x = pt.vector("x")
  >>> assert_op = Assert("This assert failed")
  >>> func = pytensor.function([x], assert_op(x, x.size < 2))
class_docstr_tok: ["Implements","assertion","in","a","computational","graph",".","Returns","the","first","parameter","if","the","condition","is","``","True","``",";","otherwise",",","triggers","`","AssertionError","`",".","Notes","--","--","-","This","`","Op","`","is","a","debugging","feature",".","It","can","be","removed","from","the","graph","because","of","optimizations",",","and","can","hide","some","possible","optimizations","to","the","optimizer",".","Specifically",",","removing","happens","if","it","can","be","determined","that","condition","will","always","be","true",".","Also",",","the","output","of","the","Op","must","be","used","in","the","function","computing","the","graph",",","but","it","does","n't","have","to","be","returned",".","Examples","--","--","--","--",">",">",">","import","pytensor",">",">",">","import","pytensor.tensor","as","pt",">",">",">","from","pytensor.raise_op","import","Assert",">",">",">","x","=","pt.vector","(","``","x","''",")",">",">",">","assert_op","=","Assert","(","``","This","assert","failed","''",")",">",">",">","func","=","pytensor.function","(","[","x","]",",","assert_op","(","x",",","x.size","<","2",")",")"]
code: def __str__(self):
      return f"Assert{{msg={self.msg}}}"
  
imports: from textwrap import indent
  import numpy
  from pytensor.gradient import DisconnectedType
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.replace import _vectorize_node
  from pytensor.link.c.op import COp
  from pytensor.link.c.params_type import ParamsType
  from pytensor.link.c.type import Generic
  from pytensor.scalar.basic import ScalarType
  from pytensor.tensor.type import DenseTensorType
label_desc: Use image node_id 2 for calling the Assert obj's underlying member method code with example usage: obj.__str__() and returns: str, self, str