code: def test_calculate_one_bound_has_much_higher_score_returns_it(self):
      # Arrange
      params = construct_params(
          aggregation_eps=0.9,
          aggregation_delta=0,
          calculation_eps=0.1,
          aggregation_noise_kind=pipeline_dp.NoiseKind.LAPLACE,
          max_partitions_contributed_upper_bound=2,
      )
      partitions = list(range(1, 201))
      l0_histogram = hist.Histogram(
          name=hist.HistogramType.L0_CONTRIBUTIONS,
          bins=[
              hist.FrequencyBin(
                  lower=1, upper=2, count=1, sum=1, max=1
              ),
              hist.FrequencyBin(
                  lower=2, upper=3, count=10000, sum=10000, max=2
              ),
          ],
      )
      histograms = [
          hist.DatasetHistograms(
              l0_histogram,
              l1_contributions_histogram=None,
              linf_contributions_histogram=None,
              linf_sum_contributions_histogram=None,
              count_per_partition_histogram=None,
              count_privacy_id_per_partition=None,
              sum_per_partition_histogram=None,
          )
      ]
      backend = pipeline_dp.LocalBackend()
      calculator = private_contribution_bounds.PrivateL0Calculator(
          params, partitions, histograms, backend
      )
  
      # Act
      l0_bound = list(calculator.calculate())[0]
  
      # Assert
      # score(1) = -0.5 * 200 * 1 / 0.9 * sqrt(2) - 0.5 * ((2 - 1) * 10000) =
      # -5157
      # score(2) = -0.5 * 200 * 2 / 0.9 * sqrt(2) - 0.5 * 0 = -314
      # probability = e^(0.1 * score / 2) / total
      # e^(0.1 * (-5157) / 2) = 1.04e-112
      # e^(0.1 * (-314) / 2) = 1.52e-7
      # probability of 2 = 1, i.e. 2 has to be returned
      self.assertEqual(l0_bound, 2)
  
file_path: pipelinedp/tests/private_contribution_bounds_test.py
imports: import unittest
  import pipeline_dp
  from pipeline_dp.dataset_histograms import histograms
  from pipeline_dp import private_contribution_bounds
label_desc: Use image node_id 2 for calling the PrivateL0CalculatorTest obj's underlying member method code with example usage: obj.test_calculate_one_bound_has_much_higher_score_returns_it() without return types