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 = function([], [], updates=[(a, a), (b, (2 * b))])
      g = 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: import numpy
  import pytest
  import pytensor.tensor
  from pytensor.compile import UnusedInputError, get_mode
  from pytensor.compile.function import function, pfunc
  from pytensor.compile.function.pfunc import rebuild_collect_shared
  from pytensor.compile.io import In
  from pytensor.compile.sharedvalue import shared
  from pytensor.configdefaults import config
  from pytensor.graph.utils import MissingInputError
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.math import sum
  from pytensor.tensor.type import bscalar, bvector, dmatrices, dmatrix, dscalar, dvector, fscalar, fvector, imatrix, iscalar, ivector, ivectors, lscalar, wvector
  from pytensor.utils import PYTHON_INT_BITWIDTH
label_desc: Use image node_id 30 for calling the TestPfunc obj's underlying member method code with example usage: obj.test_update_same() without return types