code: def test_sample_size(self):
      # Create dataset.
      number_of_sampled_partitions = 5
      input_size = 100
      input_data = range(input_size)
  
      # Run sample and check results
      params = data_peeker.SampleParams(
          number_of_sampled_partitions=number_of_sampled_partitions
      )
      data_extractor = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: f"pid{x}",
          partition_extractor=lambda x: f"pk{x%10}",
          value_extractor=lambda x: x,
      )
      key_to_v = collections.defaultdict(list)
      for _, pk, pv in self._peeker.sample(
          input_data, params, data_extractor
      ):
          key_to_v[pk].append(pv)
      self.assertLen(key_to_v, number_of_sampled_partitions)
      for v_list in key_to_v.values():
          self.assertLen(v_list, input_size / 10)
  
file_path: pipelinedp/utility_analysis/tests/data_peeker_test.py
imports: import collections
  from absl.testing import absltest
  from absl.testing import parameterized
  import pipeline_dp
  from utility_analysis import data_peeker
label_desc: Use image node_id 3 for calling the DataPeekerTest obj's underlying member method code with example usage: obj.test_sample_size() without return types