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 a Theano variable? Have the right type?
          # This could have weird consequences - for example a
          # GPU SharedVariable is customarily associated with a TensorType
          # value. Should it be cast to a GPU value right away?  Should
          # literals be transformed into constants immediately?
  
          return super(OrderedUpdates, self).__setitem__(key, value)
      else:
          raise TypeError(
              "OrderedUpdates keys must inherit from " "SharedVariable",
              key,
          )
  
file_path: Theano/theano/updates.py
imports: from __future__ import absolute_import, print_function, division
  from collections import OrderedDict
  from six import iteritems
  from theano.compile.sharedvalue import SharedVariable
  import logging
  import warnings
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