docstr: Test that two sessions using ClusterSpec propagation shares state.
  
  For example, the updated Variable value are visible among all worker
  sessions registered in the same server.
docstr_tok: ["Test","that","two","sessions","using","ClusterSpec","propagation","shares","state",".","For","example",",","the","updated","Variable","value","are","visible","among","all","worker","sessions","registered","in","the","same","server","."]
code: def testClusterSpecPropagationNonIsolation(self):
      """Test that two sessions using ClusterSpec propagation shares state.
  
      For example, the updated Variable value are visible among all worker
      sessions registered in the same server.
      """
      server = server_lib.Server.create_local_server()
      init_value = array_ops.placeholder(dtypes.int32, shape=[])
      v = variables.Variable(init_value)
  
      cluster_def = cluster_pb2.ClusterDef()
      job = cluster_def.job.add()
      job.name = "worker"
      job.tasks[0] = server.target[len("grpc://") :]
      config = config_pb2.ConfigProto(cluster_def=cluster_def)
      config.experimental.share_session_state_in_clusterspec_propagation = (
          True
      )
  
      sess1 = session.Session(server.target, config=config)
      sess2 = session.Session(server.target, config=config)
  
      # Initially, the variable is uninitialized in both sessions.
      with self.assertRaises(errors.FailedPreconditionError):
          sess1.run(v)
      with self.assertRaises(errors.FailedPreconditionError):
          sess2.run(v)
  
      # An update in sess1 should be visible in sess2.
      sess1.run(v.initializer, feed_dict={init_value: 37})
      self.assertEqual(37, sess1.run(v))
      self.assertEqual(37, sess2.run(v))
  
      # Closing sess2 has no effect on the state of sess1.
      sess2.close()
      self.assertEqual(37, sess1.run(v))
  
      # Subsequent sessions should see the state of existing sessions.
      sess3 = session.Session(server.target, config=config)
      self.assertEqual(37, sess1.run(v))
      self.assertEqual(37, sess3.run(v))
  
imports: import numpy
  from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import googletest
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 12 for calling the SessionClusterSpecPropagationTest obj's underlying member method code with example usage: obj.testClusterSpecPropagationNonIsolation() without return types