code: def get_file_format_and_patterns(
      examples: List[artifact.Artifact],
      split: str,
  ) -> Tuple[List[str], List[str]]:
      """Get aligned lists of file patterns and formats for Examples artifacts."""
      file_patterns, file_formats = [], []
      for examples_artifact in examples:
          file_pattern = examples_utils.get_split_file_patterns(
              [examples_artifact], split
          )
          assert len(file_pattern) == 1
          file_patterns.append(file_pattern[0])
          file_formats.append(
              examples_utils.get_file_format(examples_artifact)
          )
      return file_patterns, file_formats
  
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 2 for calling a global function with example usage: get_file_format_and_patterns(examples, split) and returns: file_patterns,  file_formats