code: def test_partial_function_with_updates():
      def check_updates(linker_name):
          x = tensor.lscalar("input")
          y = theano.shared(np.asarray(1, "int64"), name="global")
          f = theano.function(
              [x],
              [x, x + 34],
              updates=[(y, x + 1)],
              mode=Mode(optimizer=None, linker=linker_name),
          )
          g = theano.function(
              [x],
              [x - 6],
              updates=[(y, y + 3)],
              mode=Mode(optimizer=None, linker=linker_name),
          )
  
          assert f(3, output_subset=[]) == []
          assert y.get_value() == 4
          assert g(30, output_subset=[0]) == [24]
          assert g(40, output_subset=[]) == []
          assert y.get_value() == 10
  
      check_updates(
          vm.VM_Linker(allow_partial_eval=True, use_cloop=False)
      )
      if not theano.config.cxx:
          raise SkipTest("Need cxx for this test")
      check_updates("cvm")
  
imports: from __future__ import absolute_import, print_function, division
  import gc
  import sys
  import time
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  from six import itervalues
  from theano import function
  from theano.gof import vm
  from theano.gof import OpWiseCLinker
  from six.moves import xrange
  from theano.compile import Mode
  from theano import tensor
  from theano.ifelse import ifelse
  import theano
label_desc: Use image node_id 6 for calling a global function with example usage: test_partial_function_with_updates() without return types