code: def test_optimize_concrete_function(self, strip_control_dependencies):
      @tf.function(input_signature=[tf.TensorSpec([], dtype=tf.int64)])
      def func(x):
          z = x + 2
          with tf.init_scope():
              initializer = tf.lookup.KeyValueTensorInitializer(
                  [0, 1, 2],
                  ["a", "b", "c"],
                  key_dtype=tf.int64,
                  value_dtype=tf.string,
              )
              table = tf.lookup.StaticHashTable(
                  initializer, default_value="NAN"
              )
          _ = table.lookup(x)
          return z
  
      concrete_function = func.get_concrete_function()
      optimized_function = (
          saved_transform_io_v2.optimize_concrete_function(
              concrete_function,
              strip_control_dependencies=strip_control_dependencies,
          )
      )
      output = optimized_function(tf.constant(0, tf.int64))
      self.assertEqual(output, 2)
  
      if strip_control_dependencies:
          self.assertLess(
              len(optimized_function.graph.as_graph_def().node),
              len(concrete_function.graph.as_graph_def().node),
          )
      else:
          self.assertEqual(
              len(optimized_function.graph.as_graph_def().node),
              len(concrete_function.graph.as_graph_def().node),
          )
  
imports: import os
  import shutil
  import tempfile
  import numpy
  import tensorflow
  from tensorflow_transform import graph_context
  from tensorflow_transform import impl_helper
  from tensorflow_transform import tf_utils
  from tensorflow_transform import test_case
  from tensorflow_transform.py_func.api import apply_pyfunc
  from tensorflow_transform.saved import constants
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import script_ops
label_desc: Use image node_id 18 for calling the SavedTransformIOV2Test obj's underlying member method code with example usage: obj.test_optimize_concrete_function(strip_control_dependencies) and returns: z