code: def testWriteMetadataNonDeferred(self):
      # Write metadata to disk using WriteMetadata PTransform.
      with beam.Pipeline() as pipeline:
          path = self.get_temp_dir()
          _ = (
              test_metadata.COMPLETE_METADATA
              | beam_metadata_io.WriteMetadata(path, pipeline)
          )
  
      # Load from disk and check that it is as expected.
      metadata = metadata_io.read_metadata(path)
      self.assertEqual(metadata, test_metadata.COMPLETE_METADATA)
  
file_path: transform/tensorflow_transform/beam/tft_beam_io/beam_metadata_io_test.py
imports: import json
  import os
  import apache_beam
  import tensorflow
  from tensorflow_transform import output_wrapper
  from tensorflow_transform.beam.tft_beam_io import beam_metadata_io
  from tensorflow_transform.beam import tft_unit
  from tensorflow_transform.beam.tft_beam_io import test_metadata
  import tensorflow_transform.test_case
  from tensorflow_transform.tf_metadata import metadata_io
label_desc: Use image node_id 1 for calling the BeamMetadataIoTest obj's underlying member method code with example usage: obj.testWriteMetadataNonDeferred() without return types