code: def _testCollectiveGather(self, t0, t1, expected, set_graph_key):
      group_key = 1
      instance_key = 1
      with self.session(
          config=config_pb2.ConfigProto(device_count={"CPU": 2})
      ) as sess:
          with ops.device("/CPU:0"):
              in0 = constant_op.constant(t0)
              c0 = collective_ops.all_gather(
                  in0, 2, group_key, instance_key
              )
          with ops.device("/CPU:1"):
              in1 = constant_op.constant(t1)
              c1 = collective_ops.all_gather(
                  in1, 2, group_key, instance_key
              )
          run_options = config_pb2.RunOptions()
          if set_graph_key:
              run_options.experimental.collective_graph_key = 1
          results = sess.run([c0, c1], options=run_options)
      self.assertAllClose(results[0], expected, rtol=1e-5, atol=1e-5)
      self.assertAllClose(results[1], expected, rtol=1e-5, atol=1e-5)
  
imports: import time
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import kernels
  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 collective_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 20 for calling the CollectiveOpTest obj's underlying member method code with example usage: obj._testCollectiveGather(t0, t1, expected, set_graph_key) without return types