code: def testWriteTransformFn(self):
      transform_output_dir = os.path.join(self.get_temp_dir(), "output")
  
      with beam.Pipeline() as pipeline:
          # Create an empty directory for the source saved model dir.
          saved_model_dir = os.path.join(self.get_temp_dir(), "source")
          file_io.recursive_create_dir(saved_model_dir)
          saved_model_dir_pcoll = (
              pipeline
              | "CreateSavedModelDir" >> beam.Create([saved_model_dir])
          )
          # Combine test metadata with a dict of PCollections resolving futures.
          deferred_metadata = (
              pipeline
              | "CreateDeferredMetadata"
              >> beam.Create([test_metadata.COMPLETE_METADATA])
          )
          metadata = beam_metadata_io.BeamDatasetMetadata(
              test_metadata.INCOMPLETE_METADATA, deferred_metadata, {}
          )
  
          _ = (
              saved_model_dir_pcoll,
              metadata,
          ) | transform_fn_io.WriteTransformFn(transform_output_dir)
  
      # Test reading with TFTransformOutput
      tf_transform_output = tft.TFTransformOutput(transform_output_dir)
      metadata = tf_transform_output.transformed_metadata
      self.assertEqual(metadata, test_metadata.COMPLETE_METADATA)
  
      transform_fn_dir = tf_transform_output.transform_savedmodel_dir
      self.assertTrue(file_io.file_exists(transform_fn_dir))
      self.assertTrue(file_io.is_directory(transform_fn_dir))
  
file_path: transform/tensorflow_transform/beam/tft_beam_io/transform_fn_io_test.py
imports: import os
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform.beam.tft_beam_io import beam_metadata_io
  from tensorflow_transform.beam.tft_beam_io import transform_fn_io
  from tensorflow_transform.beam import tft_unit
  from tensorflow_transform.beam.tft_beam_io import test_metadata
  from tensorflow_transform.tf_metadata import metadata_io
  from tensorflow.python.lib.io import file_io
label_desc: Use image node_id 2 for calling the TransformFnIoTest obj's underlying member method code with example usage: obj.testWriteTransformFn() without return types