code: def get_io_provider(
      file_format: Optional[str] = None,
  ) -> StatisticsIOProvider:
      """Get a StatisticsIOProvider for writing and reading sharded stats.
  
      Args:
        file_format: Optional file format. Supports only tfrecords. If unset,
          defaults to tfrecords.
  
      Returns:
        A StatisticsIOProvider.
      """
  
      if file_format is None:
          file_format = "tfrecords"
      if file_format not in ("tfrecords",):
          raise ValueError("Unrecognized file_format %s" % file_format)
      return _TFRecordProviderImpl()
  
imports: from typing import Callable, Iterable, Iterator, Optional, Type, TypeVar
  import apache_beam
  import tensorflow
  from google.protobuf import message
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: get_io_provider(file_format) and returns: _TFRecordProviderImpl