code: def _transform_data(sequence_example_tfxio):
      """Transform the data and output transformed values.
  
      Args:
        sequence_example_tfxio: tfxio.TFSequenceExampleRecord Object
      """
  
      with beam.Pipeline() as pipeline:
          with tft_beam.Context(
              temp_dir=os.path.join(
                  tempfile.mkdtemp(), _TRANSFORM_TEMP_DIR
              )
          ):
              raw_data = (
                  pipeline
                  | "ReadAndDecode"
                  >> sequence_example_tfxio.BeamSource()
              )
              _ = raw_data | "PrintInputData" >> beam.Map(
                  _print_record_batch
              )
  
              (transformed_data, _), _ = (
                  raw_data,
                  sequence_example_tfxio.TensorAdapterConfig(),
              ) | "AnalyzeAndTransform" >> tft_beam.AnalyzeAndTransformDataset(
                  _preprocessing_fn, output_record_batches=True
              )
  
              # Drop empty pass-through features dictionary that is not relevant
              # for this example.
              transformed_data = (
                  transformed_data | "ExtractRecordBatch" >> beam.Keys()
              )
              _ = transformed_data | "PrintTransformedData" >> beam.Map(
                  _print_record_batch
              )
  
file_path: transform/examples/simple_sequence_example.py
imports: import os
  import tempfile
  from absl import logging
  import apache_beam
  import tensorflow_transform
  import tensorflow_transform.beam
  from tfx_bsl.public import tfxio
  from tensorflow_metadata.proto.v0 import schema_pb2
  from google.protobuf import text_format
label_desc: Use image node_id 4 for calling a global function with example usage: _transform_data(sequence_example_tfxio) without return types