class_docstr: This class joins a variable with its computed value.
  
  It is used in linkers, especially for the inputs and outputs of a Function.
  
  Parameters
  ----------
  r
      The `Variable` or `Type` to associate with the `Container`.
  storage
      A list of length 1, whose element is the value for `r`.
  readonly : bool
      True indicates that this should not be setable by Function[r] = val.
  strict : bool
      If True, we don't allow type casting.
  allow_downcast : bool
      If True (and `strict` is False), allow upcasting of type, but not
      downcasting. If False, prevent it. If None (default), allows only
      downcasting of float to floatX scalar.
  name : str
      A string (for pretty-printing?)
class_docstr_tok: ["This","class","joins","a","variable","with","its","computed","value",".","It","is","used","in","linkers",",","especially","for","the","inputs","and","outputs","of","a","Function",".","Parameters","--","--","--","--","--","r","The","`","Variable","`","or","`","Type","`","to","associate","with","the","`","Container","`",".","storage","A","list","of","length","1",",","whose","element","is","the","value","for","`","r","`",".","readonly",":","bool","True","indicates","that","this","should","not","be","setable","by","Function","[","r","]","=","val",".","strict",":","bool","If","True",",","we","do","n't","allow","type","casting",".","allow_downcast",":","bool","If","True","(","and","`","strict","`","is","False",")",",","allow","upcasting","of","type",",","but","not","downcasting",".","If","False",",","prevent","it",".","If","None","(","default",")",",","allows","only","downcasting","of","float","to","floatX","scalar",".","name",":","str","A","string","(","for","pretty-printing","?",")"]
code: def __init__(
      self,
      r: Union[Variable, Type],
      storage: list[Any],
      *,
      readonly: bool = False,
      strict: bool = False,
      allow_downcast: Optional[bool] = None,
      name: Optional[str] = None,
  ) -> None:
      if not isinstance(storage, list) or not len(storage) >= 1:
          raise TypeError(
              "storage must be a list of length at least one"
          )
      if isinstance(r, Variable):
          self.type = r.type
      else:
          self.type = r
  
      if name is None:
          # Some Type do not have a name field.
          self.name = getattr(r, "name", None)
      else:
          self.name = name
  
      self.storage = storage
      self.readonly = readonly
      self.strict = strict
      self.allow_downcast = allow_downcast
  
imports: from abc import ABC, abstractmethod
  from collections.abc import Sequence
  from copy import copy, deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Optional, Union
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.type import Type
  from pytensor.link.utils import gc_helper, map_storage, raise_with_op, streamline
  from pytensor.utils import difference
label_desc: Use image node_id 1 to create a new Container object  with example: obj = Container(r, storage)