code: def test_table_roundtrip(self):
      export_path = os.path.join(tempfile.mkdtemp(), "export")
  
      with tf.compat.v1.Graph().as_default():
          with tf.compat.v1.Session().as_default() as session:
              input_string = tf.compat.v1.placeholder(tf.string)
              # Map string through a table, in this case based on a constant tensor.
              table_keys = ["cat", "dog", "giraffe"]
              initializer = tf.lookup.KeyValueTensorInitializer(
                  keys=table_keys,
                  values=tf.cast(tf.range(len(table_keys)), tf.int64),
                  key_dtype=tf.string,
                  value_dtype=tf.int64,
              )
              table = tf.lookup.StaticHashTable(
                  initializer, default_value=-1
              )
  
              output = table.lookup(input_string)
              inputs = {"input": input_string}
              outputs = {"output": output}
              saved_transform_io.write_saved_transform_from_session(
                  session, inputs, outputs, export_path
              )
  
      with tf.compat.v1.Graph().as_default():
          with tf.compat.v1.Session().as_default() as session:
              # Using a computed input gives confidence that the graphs are fused.
              input_string = tf.constant("dog")
              inputs = {"input": input_string}
              (
                  _,
                  outputs,
              ) = saved_transform_io.partially_apply_saved_transform_internal(
                  export_path, inputs
              )
              session.run(tf.compat.v1.tables_initializer())
              result = session.run(outputs["output"])
              self.assertEqual(1, result)
  
imports: import os
  import tempfile
  import numpy
  import tensorflow
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import lookup_ops
label_desc: Use image node_id 9 for calling the SavedTransformIOTest obj's underlying member method code with example usage: obj.test_table_roundtrip() without return types