code: def test_select_partitions(self):
      # Arrange.
      # Generate dataset, with 10 privacy units, 5 of them contribute to
      # pk0 and pk1 and 5 to pk0 only.
      input = [(i % 10, f"pk{i//10}") for i in range(15)]
      data_extractors = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: x[0],
          partition_extractor=lambda x: x[1],
          value_extractor=lambda x: 0,
      )
  
      contribution_histograms = list(
          computing_histograms.compute_dataset_histograms(
              input, data_extractors, pipeline_dp.LocalBackend()
          )
      )[0]
  
      tune_options = _get_tune_options(metrics=[])
  
      # Act.
      result = parameter_tuning.tune(
          input,
          pipeline_dp.LocalBackend(),
          contribution_histograms,
          tune_options,
          data_extractors,
      )
  
      # Assert.
      tune_result, per_partition_utility_analysis = result
      per_partition_utility_analysis = list(
          per_partition_utility_analysis
      )
      self.assertLen(per_partition_utility_analysis, 4)
  
      tune_result = list(tune_result)[0]
  
      self.assertEqual(tune_options, tune_result.options)
      self.assertEqual(
          contribution_histograms, tune_result.contribution_histograms
      )
      utility_reports = tune_result.utility_reports
      self.assertLen(utility_reports, 2)
      self.assertIsInstance(utility_reports[0], metrics.UtilityReport)
      self.assertIsNone(utility_reports[0].metric_errors)
      self.assertEqual(
          utility_reports[0].partitions_info.num_dataset_partitions, 2
      )
      self.assertAlmostEqual(
          utility_reports[0].partitions_info.kept_partitions.mean,
          1.93e-7,
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from unittest import mock
  from unittest.mock import patch
  from typing import List, Optional
  import pipeline_dp
  import analysis
  from analysis import metrics
  from analysis import parameter_tuning
  from pipeline_dp.dataset_histograms import histograms
  from pipeline_dp.dataset_histograms import computing_histograms
label_desc: Use image node_id 10 for calling the ParameterTuning obj's underlying member method code with example usage: obj.test_select_partitions() without return types