code: def test_copy_delete_updates(self):
      w = T.iscalar("w")
      x = T.fscalar("x")
      # SharedVariable for tests, one of them has update
      y = theano.shared(value=1, name="y")
      z = theano.shared(value=2, name="z")
      out = x + y + z
  
      # Test for different linkers
      # for mode in ["FAST_RUN","FAST_COMPILE"]:
      # second_time = False
      for mode in ["FAST_RUN", "FAST_COMPILE"]:
          ori = theano.function([x], out, mode=mode, updates={z: z * 2})
          cpy = ori.copy(delete_updates=True)
  
          assert cpy(1)[0] == 4
          assert cpy(1)[0] == 4
          assert cpy(1)[0] == 4
  
      # Test if unused implicit and explicit inputs from delete_updates
      # are ignored as intended.
      for mode in ["FAST_RUN", "FAST_COMPILE"]:
          ori = theano.function([x], x, mode=mode, updates={z: z * 2})
          cpy = ori.copy(delete_updates=True)
  
          ori = theano.function(
              [x, w], x, mode=mode, updates={z: z + w}
          )
          cpy = ori.copy(delete_updates=True)
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import six.moves.cPickle
  import numpy
  import unittest
  import time
  from theano import config, gof
  from six import iteritems
  from theano.compile.io import In, Out
  from theano.compile import function
  from theano.compile import UnusedInputError
  from theano.gof import MissingInputError
  from theano.compat import exc_message
  from theano.tests.unittest_tools import SkipTest
  from theano import tensor
  from theano import tensor
  import theano
label_desc: Use image node_id 19 for calling the T_function obj's underlying member method code with example usage: obj.test_copy_delete_updates() without return types