class_docstr: Representative dataset loader.
  
  Exposes the `load` method that loads the representative dataset from files.
class_docstr_tok: ["Representative","dataset","loader",".","Exposes","the","`","load","`","method","that","loads","the","representative","dataset","from","files","."]
docstr: Loads TFRecord containing samples of type`RepresentativeDataSample`.
docstr_tok: ["Loads","TFRecord","containing","samples","of","type","`","RepresentativeDataSample","`","."]
code: def _load_tf_record(
      self, tf_record_path: str
  ) -> RepresentativeDataset:
      """Loads TFRecord containing samples of type`RepresentativeDataSample`."""
      samples = []
      with context.eager_mode():
          for sample_bytes in readers.TFRecordDatasetV2(
              filenames=[tf_record_path]
          ):
              sample_proto = _RepresentativeDataSample.FromString(
                  sample_bytes.numpy()
              )
              sample = {}
              for (
                  input_key,
                  tensor_proto,
              ) in sample_proto.tensor_proto_inputs.items():
                  sample[input_key] = tensor_util.MakeNdarray(
                      tensor_proto
                  )
              samples.append(sample)
      return samples
  
imports: import collections.abc
  import os
  from typing import Iterable, Mapping, Optional, Union
  import numpy
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.client import session
  from tensorflow.python.data.ops import readers
  from tensorflow.python.eager import context
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.lib.io import python_io
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.types import core
  from tensorflow.python.util import tf_export
label_desc: Use image node_id 2 for calling the RepresentativeDatasetLoader obj's underlying member method code with example usage: obj._load_tf_record(tf_record_path) and returns: samples