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)
Transform the data and output transformed values.

  Args:
    sequence_example_tfxio: tfxio.TFSequenceExampleRecord Object
  
examples/simple_sequence_example.py