code: def load_stats_tfrecord(
      input_path: Text,
  ) -> statistics_pb2.DatasetFeatureStatisticsList:
      """Loads data statistics proto from TFRecord file.
  
      Args:
        input_path: Data statistics file path.
  
      Returns:
        A DatasetFeatureStatisticsList proto.
      """
      it = artifacts_io_impl.get_io_provider(
          "tfrecords"
      ).record_iterator_impl([input_path])
      result = next(it)
      try:
          next(it)
          raise ValueError(
              "load_stats_tfrecord expects a single record."
          )
      except StopIteration:
          return result
      except Exception as e:
          raise e
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from typing import Dict, Iterable, Optional, Sequence, Text, Tuple, Union
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.utils import io_util
  from tfx_bsl import statistics
  from tfx_bsl.arrow import array_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 9 for calling a global function with example usage: load_stats_tfrecord(input_path) and returns: result