code: def testVariableObjectsAreSharedAmongCollections(self):
      with ops.Graph().as_default() as graph1:
          v = variables.Variable(3.0)
          # A single instance of Variable is shared among the collections:
          global_vars = graph1.get_collection(
              ops.GraphKeys.GLOBAL_VARIABLES
          )
          trainable_vars = graph1.get_collection(
              ops.GraphKeys.TRAINABLE_VARIABLES
          )
          self.assertEqual(len(global_vars), 1)
          self.assertEqual(len(trainable_vars), 1)
          self.assertIs(global_vars[0], trainable_vars[0])
          self.assertIs(v, global_vars[0])
  
      orig_meta_graph, _ = meta_graph.export_scoped_meta_graph(
          graph=graph1
      )
      del graph1  # To avoid accidental references in code involving graph2.
  
      with ops.Graph().as_default() as graph2:
          meta_graph.import_scoped_meta_graph(orig_meta_graph)
          global_vars = graph2.get_collection(
              ops.GraphKeys.GLOBAL_VARIABLES
          )
          trainable_vars = graph2.get_collection(
              ops.GraphKeys.TRAINABLE_VARIABLES
          )
          self.assertEqual(len(global_vars), 1)
          self.assertEqual(len(trainable_vars), 1)
          # A single instance of Variable is shared among the collections:
          self.assertIs(global_vars[0], trainable_vars[0])
  
imports: import math
  import os.path
  import random
  import shutil
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.protobuf import meta_graph_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 function
  from tensorflow.python.framework import meta_graph
  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 cond
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import metrics
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import partitioned_variables
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.training import queue_runner_impl
label_desc: Use image node_id 8 for calling the SimpleMetaGraphTest obj's underlying member method code with example usage: obj.testVariableObjectsAreSharedAmongCollections() without return types