code: def testPruneStatefulOpsFromWrappedFunc(self):
      v0 = variables.Variable(0)
      v1 = variables.Variable(0)
  
      # When we wrap a function, we expect it to be executed with 'tf.Graph`
      # rules: it's allowed to prune all ops that are not in transitive fanin of
      # the fetches.
      def f(x):
          v0.assign_add(1, name="increment_v0")
          v1.assign_add(1, name="increment_v1")
          return x
  
      f_wrapped = wrap_function.wrap_function(f, [1])
  
      self.assertEqual(1, f_wrapped().numpy())
      self.assertEqual(0, v0.numpy())
      self.assertEqual(0, v1.numpy())
  
      f_wrapped_with_name = wrap_function.wrap_function(
          f, [2], name="func"
      )
  
      self.assertEqual(2, f_wrapped_with_name().numpy())
      self.assertEqual(0, v0.numpy())
      self.assertEqual(0, v1.numpy())
  
imports: import os
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import wrap_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import importer
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
  from tensorflow.python.training import saver
label_desc: Use image node_id 11 for calling the WrapFunctionTest obj's underlying member method code with example usage: obj.testPruneStatefulOpsFromWrappedFunc() and returns: x