code: def test_update_same(self):
      # There was a bug in CVM, triggered when a shared variable
      # was its own update expression.
      a = shared(1.0, "a")
      b = shared(np.ones((2, 3)), "b")
  
      # The order of the variables is not determined, so we try
      # both shared variables.
      # TODO: explain the above comment. By "not determined" does
      # this mean "not deterministic"?
      # This test originally wrote the updates using dictionaries,
      # and iterating over the dictionary was not deterministic.
      # Is that all the comment above meant, or is the CVM intended
      # to add extra non-determinism? Or is the CVM meant to
      # deterministically but arbitrarily pick an order for the updates?
      f = theano.function([], [], updates=[(a, a), (b, (2 * b))])
      g = theano.function([], [], updates=[(a, (a * 2)), (b, b)])
  
      f()
      assert a.get_value(borrow=True).shape == (), a.get_value()
      assert b.get_value(borrow=True).shape == (2, 3), b.get_value()
      g()
      assert a.get_value(borrow=True).shape == (), a.get_value()
      assert b.get_value(borrow=True).shape == (2, 3), b.get_value()
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  from theano.tensor import dmatrix, iscalar, lscalar, dmatrices
  from theano import tensor
  from theano.compile import In
  from theano.compile import pfunc
  from theano.compile import shared
  from theano.compile import config
label_desc: Use image node_id 29 for calling the Test_pfunc obj's underlying member method code with example usage: obj.test_update_same() without return types