code: def _testScopedExport(self, test_dir, exported_filenames):
      graph = ops.Graph()
      with graph.as_default():
          # Creates an inference graph.
          # Hidden 1
          colocate_constraint = constant_op.constant(
              1.2, name="constraint"
          )
          images = constant_op.constant(
              1.2, dtypes.float32, shape=[100, 28], name="images"
          )
          with ops.name_scope("hidden1"):
              with graph.colocate_with(colocate_constraint.op):
                  weights1 = variables.Variable(
                      random_ops.truncated_normal(
                          [28, 128], stddev=1.0 / math.sqrt(float(28))
                      ),
                      name="weights",
                  )
              # The use of cond.cond here is purely for adding test
              # coverage the save and restore of control flow context (which doesn't
              # make any sense here from a machine learning perspective).  The typical
              # biases is a simple Variable without the conditions.
              biases1 = variables.Variable(
                  cond.cond(
                      math_ops.less(random.random(), 0.5),
                      lambda: array_ops.ones([128]),
                      lambda: array_ops.zeros([128]),
                  ),
                  name="biases",
              )
              hidden1 = nn_ops.relu(
                  math_ops.matmul(images, weights1) + biases1
              )
  
          # Hidden 2
          with ops.name_scope("hidden2"):
              weights2 = variables.Variable(
                  random_ops.truncated_normal(
                      [128, 32], stddev=1.0 / math.sqrt(float(128))
                  ),
                  name="weights",
              )
  
              # The use of while_loop.while_loop here is purely for adding test
              # coverage the save and restore of control flow context (which doesn't
              # make any sense here from a machine learning perspective).  The typical
              # biases is a simple Variable without the conditions.
              def loop_cond(it, _):
                  return it < 2
  
              def loop_body(it, biases2):
                  biases2 += constant_op.constant(0.1, shape=[32])
                  return it + 1, biases2
  
              _, biases2 = while_loop.while_loop(
                  loop_cond,
                  loop_body,
                  [
                      constant_op.constant(0),
                      variables.Variable(
                          array_ops.zeros([32]), name="biases"
                      ),
                  ],
              )
              hidden2 = nn_ops.relu(
                  math_ops.matmul(hidden1, weights2) + biases2
              )
          # Linear
          with ops.name_scope("softmax_linear"):
              weights3 = variables.Variable(
                  random_ops.truncated_normal(
                      [32, 10], stddev=1.0 / math.sqrt(float(32))
                  ),
                  name="weights",
              )
              biases3 = variables.Variable(
                  array_ops.zeros([10]), name="biases"
              )
              logits = math_ops.matmul(hidden2, weights3) + biases3
              ops.add_to_collection("logits", logits)
  
          # Exports each sub-graph.
          # Exports the first one with unbound_inputs_col_name set to default.
          (
              orig_meta_graph1,
              var_list,
          ) = meta_graph.export_scoped_meta_graph(
              filename=os.path.join(test_dir, exported_filenames[0]),
              graph=ops.get_default_graph(),
              export_scope="hidden1",
          )
          self.assertEqual(
              ["biases:0", "weights:0"], sorted(var_list.keys())
          )
          var_names = [v.name for _, v in var_list.items()]
          self.assertEqual(
              ["hidden1/biases:0", "hidden1/weights:0"],
              sorted(var_names),
          )
  
          # Exports the rest with no unbound_inputs_col_name.
          orig_meta_graph2, _ = meta_graph.export_scoped_meta_graph(
              filename=os.path.join(test_dir, exported_filenames[1]),
              graph=ops.get_default_graph(),
              export_scope="hidden2",
              unbound_inputs_col_name=None,
          )
          orig_meta_graph3, _ = meta_graph.export_scoped_meta_graph(
              filename=os.path.join(test_dir, exported_filenames[2]),
              graph=ops.get_default_graph(),
              export_scope="softmax_linear",
              unbound_inputs_col_name=None,
          )
  
      return [orig_meta_graph1, orig_meta_graph2, orig_meta_graph3]
  
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 ScopedMetaGraphTest obj's underlying member method code with example usage: obj._testScopedExport(test_dir, exported_filenames) and returns: list, unknown, unknown,  biases2