class_docstr: Class used to encode the different things the inner function of scan can
  (or needs) to return.
  
  This class has to be used when scan needs to halt when a condition is
  met, otherwise the list of outputs and dictionary can directly be return
  as a tuple. The reason is that otherwise scan has no way to distinguish
  between the condition and the list of outputs ( unless we enforce and
  order, but since this was not impose up to know it can make quite a bit
  of code to fail).
class_docstr_tok: ["Class","used","to","encode","the","different","things","the","inner","function","of","scan","can","(","or","needs",")","to","return",".","This","class","has","to","be","used","when","scan","needs","to","halt","when","a","condition","is","met",",","otherwise","the","list","of","outputs","and","dictionary","can","directly","be","return","as","a","tuple",".","The","reason","is","that","otherwise","scan","has","no","way","to","distinguish","between","the","condition","and","the","list","of","outputs","(","unless","we","enforce","and","order",",","but","since","this","was","not","impose","up","to","know","it","can","make","quite","a","bit","of","code","to","fail",")","."]
code: def __init__(self, condition):
      self.condition = pt.as_tensor_variable(condition)
      assert self.condition.ndim == 0
  
imports: import copy
  import dataclasses
  import logging
  from collections import OrderedDict, namedtuple
  from collections.abc import Sequence
  from itertools import chain
  from typing import TYPE_CHECKING, Callable, Optional, Union
  from typing import cast
  import numpy
  from pytensor import scalar
  from pytensor import tensor
  from pytensor.compile.profiling import ProfileStats
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Constant, Variable, equal_computations, graph_inputs
  from pytensor.graph.op import get_test_value
  from pytensor.graph.replace import clone_replace
  from pytensor.graph.type import HasDataType
  from pytensor.graph.utils import TestValueError
  from pytensor.tensor.basic import AllocEmpty, cast
  from pytensor.tensor.subtensor import set_subtensor
  from pytensor.tensor.variable import TensorConstant
label_desc: Use image node_id 1 to create a new until object  with example: obj = until(condition)