code: def test_select_partition(
      self, pre_threshold: Optional[int], expected_prob: float
  ):
      # Arrange
      aggregate_params = pipeline_dp.AggregateParams(
          noise_kind=pipeline_dp.NoiseKind.GAUSSIAN,
          metrics=[],
          max_partitions_contributed=1,
          max_contributions_per_partition=2,
          pre_threshold=pre_threshold,
      )
  
      # Input collection has 10 privacy ids where each privacy id
      # contributes to the same 10 partitions, three times in each partition.
      col = [(i, j) for i in range(10) for j in range(10)] * 3
  
      data_extractors = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: x[0],
          partition_extractor=lambda x: f"pk{x[1]}",
          value_extractor=lambda x: 1,
      )
  
      _, per_partition_result = analysis.perform_utility_analysis(
          col=col,
          backend=pipeline_dp.LocalBackend(),
          options=analysis.UtilityAnalysisOptions(
              epsilon=3, delta=0.9, aggregate_params=aggregate_params
          ),
          data_extractors=data_extractors,
      )
  
      per_partition_result = list(per_partition_result)
  
      # Assert
      key, per_partition_metrics = per_partition_result[0]
      self.assertAlmostEqual(
          per_partition_metrics.partition_selection_probability_to_keep,
          expected_prob,
      )
  
imports: import copy
  from absl.testing import absltest
  from absl.testing import parameterized
  import pipeline_dp
  import analysis
  from analysis import metrics
  from analysis import utility_analysis
  from analysis.tests import common
  from typing import Optional
label_desc: Use image node_id 11 for calling the UtilityAnalysis obj's underlying member method code with example usage: obj.test_select_partition(pre_threshold, expected_prob) without return types