code: def testStrippedOpListNestedFunctions(self):
      with self.cached_session():
          # Square two levels deep
          @function.Defun(dtypes.int32)
          def f0(x):
              return math_ops.square(x)
  
          @function.Defun(dtypes.int32)
          def f1(x):
              return f0(x)
  
          # At this point we've defined two functions but haven't called them, so
          # there should be no used ops.
          op_list = meta_graph.stripped_op_list_for_graph(
              ops.get_default_graph().as_graph_def()
          )
          self.assertEqual(len(op_list.op), 0)
  
          # If we call the function on a constant, there should be two ops
          _ = f1(constant_op.constant(7))
          op_list = meta_graph.stripped_op_list_for_graph(
              ops.get_default_graph().as_graph_def()
          )
          self.assertEqual(
              ["Const", "Square"], [op.name for op in op_list.op]
          )
  
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 2 for calling the SimpleMetaGraphTest obj's underlying member method code with example usage: obj.testStrippedOpListNestedFunctions() and returns: math_ops, f0