code: def test_partition_selection_combiner(
      self, mock_compute_probability_to_keep
  ):
      mechanism_spec, params = _create_combiner_params_for_count()
      combiner = combiners.PartitionSelectionCombiner(
          mechanism_spec, params
      )
      sparse_acc = _create_sparse_combiner_acc(
          ([1, 2, 3],), n_partitions=[8]
      )
      acc = combiner.create_accumulator(sparse_acc)
      probabilities, moments = acc
      self.assertLen(probabilities, 1)
      self.assertEqual(1 / 8, probabilities[0])
      mock_compute_probability_to_keep.assert_not_called()
      combiner.compute_metrics(acc)
      mock_compute_probability_to_keep.assert_called_with(
          pipeline_dp.PartitionSelectionStrategy.TRUNCATED_GEOMETRIC,
          mechanism_spec.eps,
          mechanism_spec.delta,
          1,
          None,
      )
  
imports: import dataclasses
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
  from unittest.mock import patch
  from typing import Tuple
  import pipeline_dp
  from analysis import per_partition_combiners
  from analysis import metrics
  from analysis.tests import common
label_desc: Use image node_id 8 for calling the PartitionSelectionTest obj's underlying member method code with example usage: obj.test_partition_selection_combiner(mock_compute_probability_to_keep) without return types