class_docstr: Generic TFX example gen base executor.
  
  The base ExampleGen executor takes a configuration and converts external data
  sources to TensorFlow Examples (tf.train.Example, tf.train.SequenceExample),
  or any other protocol buffer as subclass defines.
  
  The common configuration (defined in
  https://github.com/tensorflow/tfx/blob/master/tfx/proto/example_gen.proto#L44.)
  describes the general properties of input data and shared instructions when
  producing output data.
  
  The conversion is done in `GenerateExamplesByBeam` as a Beam pipeline, which
  validates the configuration, reads the external data sources, converts the
  record in the input source to any supported output payload formats
  (e.g., tf.Example or tf.SequenceExample) if needed, and splits the examples
  if the output split config is given. Then the executor's `Do` writes the
  results in splits to the output path.
  
  For simple custom ExampleGens, the details of transforming input data
  record(s) to a specific output payload format (e.g., tf.Example or
  tf.SequenceExample) is expected to be given in
  `GetInputSourceToExamplePTransform`, which returns a Beam PTransform with the
  actual implementation. For complex use cases, such as joining multiple data
  sources and different interpretations of the configurations, the custom
  ExampleGen can override `GenerateExamplesByBeam`.
docstr: Returns PTransform for converting input source to records.
  
  The record is by default assumed to be tf.train.Example protos, subclassses
  can serialize any protocol buffer into bytes as output PCollection,
  so long as the downstream component can consume it.
  
  Note that each input split will be transformed by this function separately.
  For complex use case, consider override 'GenerateExamplesByBeam' instead.
  
  Here is an example PTransform:
    @beam.ptransform_fn
    @beam.typehints.with_input_types(beam.Pipeline)
    @beam.typehints.with_output_types(Union[tf.train.Example,
                                            tf.train.SequenceExample,
                                            bytes])
    def ExamplePTransform(
        pipeline: beam.Pipeline,
        exec_properties: Dict[Text, Any],
        split_pattern: Text) -> beam.pvalue.PCollection
docstr_tok: ["Returns","PTransform","for","converting","input","source","to","records",".","The","record","is","by","default","assumed","to","be","tf.train.Example","protos",",","subclassses","can","serialize","any","protocol","buffer","into","bytes","as","output","PCollection",",","so","long","as","the","downstream","component","can","consume","it",".","Note","that","each","input","split","will","be","transformed","by","this","function","separately",".","For","complex","use","case",",","consider","override","'GenerateExamplesByBeam","'","instead",".","Here","is","an","example","PTransform",":","@","beam.ptransform_fn","@","beam.typehints.with_input_types","(","beam.Pipeline",")","@","beam.typehints.with_output_types","(","Union","[","tf.train.Example",",","tf.train.SequenceExample",",","bytes","]",")","def","ExamplePTransform","(","pipeline",":","beam.Pipeline",",","exec_properties",":","Dict","[","Text",",","Any","]",",","split_pattern",":","Text",")","-",">","beam.pvalue.PCollection"]
code: def GetInputSourceToExamplePTransform(self) -> beam.PTransform:
      """Returns PTransform for converting input source to records.
  
      The record is by default assumed to be tf.train.Example protos, subclassses
      can serialize any protocol buffer into bytes as output PCollection,
      so long as the downstream component can consume it.
  
      Note that each input split will be transformed by this function separately.
      For complex use case, consider override 'GenerateExamplesByBeam' instead.
  
      Here is an example PTransform:
        @beam.ptransform_fn
        @beam.typehints.with_input_types(beam.Pipeline)
        @beam.typehints.with_output_types(Union[tf.train.Example,
                                                tf.train.SequenceExample,
                                                bytes])
        def ExamplePTransform(
            pipeline: beam.Pipeline,
            exec_properties: Dict[Text, Any],
            split_pattern: Text) -> beam.pvalue.PCollection
      """
      pass
  
imports: import abc
  import bisect
  import hashlib
  import pickle
  from typing import Any, Dict, List, Union
  from absl import logging
  import apache_beam
  import tensorflow
  from tfx import types
  from tfx.components.example_gen import utils
  from tfx.components.example_gen import write_split
  from tfx.components.util import examples_utils
  from tfx.dsl.components.base import base_beam_executor
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import proto_utils
label_desc: Use image node_id 1 for calling the BaseExampleGenExecutor obj's underlying member method code with example usage: obj.GetInputSourceToExamplePTransform() without return types