class_docstr: Dict-like mapping from SharedVariable keys to their new values.
  
  This mapping supports the use of the "+" operator for the union of updates.
class_docstr_tok: ["Dict-like","mapping","from","SharedVariable","keys","to","their","new","values",".","This","mapping","supports","the","use","of","the","``","+","''","operator","for","the","union","of","updates","."]
code: def __setitem__(self, key, value):
      if isinstance(key, SharedVariable):
          # TODO: consider doing error-checking on value.
          # insist that it is an PyTensor variable? Have the right type?
          # This could have weird consequences - for example a
  
          return super().__setitem__(key, value)
      else:
          raise TypeError(
              "OrderedUpdates keys must inherit from SharedVariable",
              key,
          )
  
file_path: pytensor/pytensor/updates.py
imports: import logging
  import warnings
  from collections import OrderedDict
  from pytensor.compile.sharedvalue import SharedVariable
label_desc: Use image node_id 2 for calling the OrderedUpdates obj's underlying member method code with example usage: obj.__setitem__(key, value) and returns: super