code: def test_in_update_shared(self):
      # Test that using both In() with updates and shared variables with
      # updates in the same function behaves as expected
      shared_var = theano.shared(1.0)
      a = theano.tensor.dscalar("a")
      a_wrapped = In(a, value=0.0, update=shared_var)
      f = theano.function(
          [a_wrapped], [], updates={shared_var: a}, mode="FAST_RUN"
      )
  
      # Ensure that, through the executions of the function, the state of
      # the input and the shared variable are appropriate (after N execution,
      # the values have swapped N times). This allows testing that the
      # changes occur at the same time and one doesn't overwrite the other.
      for i in range(5):
          f()
          assert np.allclose(shared_var.get_value(), i % 2)
  
imports: from __future__ import absolute_import, print_function, division
  import six.moves.cPickle
  import os
  import shutil
  import tempfile
  import unittest
  import numpy
  import theano
  from theano.compile.io import In
label_desc: Use image node_id 7 for calling the TestFunctionIn obj's underlying member method code with example usage: obj.test_in_update_shared() without return types