code: def testNoVariables(self):
      test_dir = _TestDir("no_variables")
      filename = os.path.join(test_dir, "metafile")
  
      input_feed_value = -10  # Arbitrary input value for feed_dict.
  
      orig_graph = ops.Graph()
      with self.session(graph=orig_graph) as sess:
          # Create a minimal graph with zero variables.
          input_tensor = array_ops.placeholder(
              dtypes.float32, shape=[], name="input"
          )
          offset = constant_op.constant(
              42, dtype=dtypes.float32, name="offset"
          )
          output_tensor = math_ops.add(
              input_tensor, offset, name="add_offset"
          )
  
          # Add input and output tensors to graph collections.
          ops.add_to_collection("input_tensor", input_tensor)
          ops.add_to_collection("output_tensor", output_tensor)
  
          output_value = sess.run(
              output_tensor, {input_tensor: input_feed_value}
          )
          self.assertEqual(output_value, 32)
  
          # Generates MetaGraphDef.
          (
              meta_graph_def,
              var_list,
          ) = meta_graph.export_scoped_meta_graph(
              filename=filename,
              graph_def=ops.get_default_graph().as_graph_def(
                  add_shapes=True
              ),
              collection_list=["input_tensor", "output_tensor"],
              saver_def=None,
          )
          self.assertTrue(meta_graph_def.HasField("meta_info_def"))
          self.assertNotEqual(
              meta_graph_def.meta_info_def.tensorflow_version, ""
          )
          self.assertNotEqual(
              meta_graph_def.meta_info_def.tensorflow_git_version, ""
          )
          self.assertEqual({}, var_list)
  
      # Create a clean graph and import the MetaGraphDef nodes.
      new_graph = ops.Graph()
      with self.session(graph=new_graph) as sess:
          # Import the previously export meta graph.
          meta_graph.import_scoped_meta_graph(filename)
  
          # Re-exports the current graph state for comparison to the original.
          new_meta_graph_def, _ = meta_graph.export_scoped_meta_graph(
              filename + "_new"
          )
          test_util.assert_meta_graph_protos_equal(
              self, meta_graph_def, new_meta_graph_def
          )
  
          # Ensures that we can still get a reference to our graph collections.
          new_input_tensor = ops.get_collection("input_tensor")[0]
          new_output_tensor = ops.get_collection("output_tensor")[0]
          # Verifies that the new graph computes the same result as the original.
          new_output_value = sess.run(
              new_output_tensor, {new_input_tensor: input_feed_value}
          )
          self.assertEqual(new_output_value, output_value)
  
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 1 for calling the SimpleMetaGraphTest obj's underlying member method code with example usage: obj.testNoVariables() without return types