code: def get_data_view_decode_fn_from_artifact(
      examples: List[artifact.Artifact],
      telemetry_descriptors: List[str],
  ) -> Optional[Callable[[tf.Tensor], Dict[str, Any]]]:
      """Returns the decode function wrapped in the examples' Data View.
  
      Args:
        examples: The Examples artifacts from which the data view is resolved.
        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.
      Returns:
        If a Data View can be resolved from `examples`, then it returns
        a TF Function that takes a 1-D string tensor (example records) and returns
        decoded (composite) tensors. Otherwise returns None.
      """
      (
          payload_format,
          data_view_uri,
      ) = resolve_payload_format_and_data_view_uri(examples)
      if (
          payload_format != example_gen_pb2.PayloadFormat.FORMAT_PROTO
          or data_view_uri is None
      ):
          return None
  
      return record_to_tensor_tfxio.BeamRecordToTensorTFXIO(
          saved_decoder_path=data_view_uri,
          telemetry_descriptors=telemetry_descriptors,
          physical_format="data_view_access_only",
          raw_record_column_name=None,
      ).DecodeFunction()
  
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 7 for calling a global function with example usage: get_data_view_decode_fn_from_artifact(examples, telemetry_descriptors) and returns: record_to_tensor_tfxio, None