code: def get_tfxio_factory_from_artifact(
      examples: List[artifact.Artifact],
      telemetry_descriptors: List[str],
      schema: Optional[schema_pb2.Schema] = None,
      read_as_raw_records: bool = False,
      raw_record_column_name: Optional[str] = None,
  ) -> Callable[[OneOrMorePatterns], tfxio.TFXIO]:
      """Returns a factory function that creates a proper TFXIO.
  
      Args:
        examples: The Examples artifacts that the TFXIO is intended to access.
        telemetry_descriptors: A set of descriptors that identify the component
          that is instantiating the TFXIO. These will be used to construct the
          namespace to contain metrics for profiling and are therefore expected to
          be identifiers of the component itself and not individual instances of
          source use.
        schema: TFMD schema. Note that without a schema, some TFXIO interfaces
          in certain TFXIO implementations might not be available.
        read_as_raw_records: If True, ignore the payload type of `examples`. Always
          use RawTfRecord TFXIO.
        raw_record_column_name: If provided, the arrow RecordBatch produced by
          the TFXIO will contain a string column of the given name, and the contents
          of that column will be the raw records. Note that not all TFXIO supports
          this option, and an error will be raised in that case. Required if
          read_as_raw_records == True.
  
      Returns:
        A function that takes a file pattern as input and returns a TFXIO
        instance.
  
      Raises:
        NotImplementedError: when given an unsupported example payload type.
      """
  
      (
          payload_format,
          data_view_uri,
      ) = resolve_payload_format_and_data_view_uri(examples)
      return lambda file_pattern: make_tfxio(  # pylint:disable=g-long-lambda
          file_pattern=file_pattern,
          telemetry_descriptors=telemetry_descriptors,
          payload_format=payload_format,
          data_view_uri=data_view_uri,
          schema=schema,
          read_as_raw_records=read_as_raw_records,
          raw_record_column_name=raw_record_column_name,
      )
  
imports: import logging
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
  import pyarrow
  import tensorflow
  from tfx.components.experimental.data_view import constants
  from tfx.components.util import examples_utils
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact
  from tfx.types import standard_artifacts
  from tfx_bsl.tfxio import dataset_options
  from tfx_bsl.tfxio import parquet_tfxio
  from tfx_bsl.tfxio import raw_tf_record
  from tfx_bsl.tfxio import record_to_tensor_tfxio
  from tfx_bsl.tfxio import tf_example_record
  from tfx_bsl.tfxio import tf_sequence_example_record
  from tfx_bsl.tfxio import tfxio
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: get_tfxio_factory_from_artifact(examples, telemetry_descriptors, schema, read_as_raw_records, raw_record_column_name) and returns: function