code: def test_partition_selection_accumulator_compute_probability(
      self,
      eps,
      delta,
      probabilities,
      expected_probability_to_keep,
      pre_threshold,
  ):
      acc = combiners.PartitionSelectionCalculator(probabilities)
      prob_to_keep = acc.compute_probability_to_keep(
          pipeline_dp.PartitionSelectionStrategy.TRUNCATED_GEOMETRIC,
          eps,
          delta,
          max_partitions_contributed=1,
          pre_threshold=pre_threshold,
      )
      self.assertAlmostEqual(
          expected_probability_to_keep, prob_to_keep, delta=1e-10
      )
  
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 7 for calling the PartitionSelectionTest obj's underlying member method code with example usage: obj.test_partition_selection_accumulator_compute_probability(eps, delta, probabilities, expected_probability_to_keep, pre_threshold) without return types