code: def WriteSplit(
      example_split: beam.pvalue.PCollection,
      output_split_path: str,
      output_format: str,
      exec_properties: Optional[Dict[str, Any]] = None,
  ) -> beam.pvalue.PDone:
      """Shuffles and writes output split as serialized records in TFRecord or Parquet."""
      del output_format
      if exec_properties:
          output_payload_format = exec_properties.get(
              standard_component_specs.OUTPUT_DATA_FORMAT_KEY
          )
  
          if (
              output_payload_format
              == example_gen_pb2.PayloadFormat.FORMAT_PARQUET
          ):
              schema = exec_properties.get("pyarrow_schema")
              return (
                  example_split
                  # TODO(jyzhao): make shuffle optional.
                  | "Shuffle" >> beam.transforms.Reshuffle()
                  | "WriteParquet"
                  >> beam.io.WriteToParquet(
                      os.path.join(
                          output_split_path, DEFAULT_PARQUET_FILE_NAME
                      ),
                      schema,
                      file_name_suffix=".parquet",
                      codec="snappy",
                  )
              )
  
      return (
          example_split
          | "MaybeSerialize" >> beam.ParDo(MaybeSerialize())
          # TODO(jyzhao): make shuffle optional.
          | "Shuffle" >> beam.transforms.Reshuffle()
          | "Write"
          >> beam.io.WriteToTFRecord(
              os.path.join(output_split_path, DEFAULT_FILE_NAME),
              file_name_suffix=".gz",
          )
      )
  
file_path: tfx/tfx/components/example_gen/write_split.py
imports: import os
  from typing import Optional, Any, Dict, Union
  import apache_beam
  import tensorflow
  from tfx.proto import example_gen_pb2
  from tfx.types import standard_component_specs
  from tfx.utils import deprecation_utils
  from tfx_bsl.telemetry import util
label_desc: Use image node_id 1 for calling a global function with example usage: WriteSplit(example_split, output_split_path, output_format, exec_properties) and returns: unknown, unknown