code: def _PrestoToExample(  # pylint: disable=invalid-name
      pipeline: beam.Pipeline,
      exec_properties: Dict[str, Any],
      split_pattern: str,
  ) -> beam.pvalue.PCollection:
      """Read from Presto and transform to TF examples.
  
      Args:
        pipeline: beam pipeline.
        exec_properties: A dict of execution properties.
        split_pattern: Split.pattern in Input config, a Presto sql string.
  
      Returns:
        PCollection of TF examples.
      """
      conn_config = example_gen_pb2.CustomConfig()
      proto_utils.json_to_proto(
          exec_properties["custom_config"], conn_config
      )
      presto_config = presto_config_pb2.PrestoConnConfig()
      conn_config.custom_config.Unpack(presto_config)
  
      client = _deserialize_conn_config(presto_config)
      return (
          pipeline
          | "Query" >> beam.Create([split_pattern])
          | "QueryTable" >> beam.ParDo(_ReadPrestoDoFn(client))
          | "ToTFExample" >> beam.Map(_row_to_example)
      )
  
imports: import datetime
  from typing import Any, Dict, Iterable, Tuple
  import apache_beam
  import prestodb
  import tensorflow
  from tfx.components.example_gen import base_example_gen_executor
  from tfx.examples.custom_components.presto_example_gen.proto import presto_config_pb2
  from tfx.proto import example_gen_pb2
  from tfx.utils import proto_utils
label_desc: Use image node_id 4 for calling a global function with example usage: _PrestoToExample(pipeline, exec_properties, split_pattern) and returns: unknown