code: def _copy_examples_as_parquet(
      examples_path: str,
      output_paths: List[str],
      schema: schema_pb2.Schema,
  ):
      """Reads a file with tf.Examples, converts and writes it in Parquet format."""
      if tf.executing_eagerly():
          examples = [
              e.numpy()
              for e in tf.data.TFRecordDataset(
                  examples_path, compression_type="GZIP"
              )
          ]
      else:
          examples = list(
              tf.compat.v1.io.tf_record_iterator(
                  examples_path,
                  tf.io.TFRecordOptions(compression_type="GZIP"),
              )
          )
      record_batch = example_coder.ExamplesToRecordBatchDecoder(
          schema.SerializeToString()
      ).DecodeBatch(examples)
      table = pa.Table.from_batches([record_batch])
      for path in output_paths:
          pq.write_table(table, path)
  
file_path: tfx/tfx/components/transform/executor_on_parquet_test.py
imports: import os
  from typing import List
  import pyarrow
  import pyarrow.parquet
  import tensorflow
  from tfx.components.transform import executor
  from tfx.components.transform import executor_test
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.utils import io_utils
  from tfx_bsl.coders import example_coder
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _copy_examples_as_parquet(examples_path, output_paths, schema) without return types