class_docstr: Tests functions for representative datasets.
class_docstr_tok: ["Tests","functions","for","representative","datasets","."]
code: def test_get_num_samples_returns_num_samples_when_list(self):
      num_samples = 8
      repr_ds = [
          {"input": np.random.uniform(low=-1.0, high=1.0, size=(1, 2))}
          for _ in range(num_samples)
      ]
  
      self.assertEqual(
          repr_dataset.get_num_samples(repr_ds), num_samples
      )
  
imports: import random
  import numpy
  from tensorflow.compiler.mlir.quantization.tensorflow.python import representative_dataset
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
  from tensorflow.python.types import core
label_desc: Use image node_id 9 for calling the RepresentativeDatasetTest obj's underlying member method code with example usage: obj.test_get_num_samples_returns_num_samples_when_list() without return types