code: def test_score_laplace_noise_valid_values_calculates_score_correctly(
      self,
  ):
      params = construct_params(
          aggregation_noise_kind=pipeline_dp.NoiseKind.LAPLACE,
          aggregation_eps=0.9,
          max_partitions_contributed_upper_bound=100,
      )
      number_of_partitions = 200
      l0_histogram = hist.Histogram(
          name=hist.HistogramType.L0_CONTRIBUTIONS,
          bins=[
              hist.FrequencyBin(
                  lower=1, upper=2, count=100, sum=100, max=1
              ),
              hist.FrequencyBin(
                  lower=2, upper=6, count=10, sum=10, max=5
              ),
              hist.FrequencyBin(
                  lower=6, upper=100, count=20, sum=20, max=60
              ),
          ],
      )
      l0_scoring_function = (
          private_contribution_bounds.L0ScoringFunction(
              params, number_of_partitions, l0_histogram
          )
      )
  
      score_1 = l0_scoring_function.score(1)
      score_2 = l0_scoring_function.score(2)
      score_5 = l0_scoring_function.score(5)
      score_6 = l0_scoring_function.score(6)
      score_60 = l0_scoring_function.score(60)
      score_61 = l0_scoring_function.score(61)
      score_101 = l0_scoring_function.score(101)
      score_200 = l0_scoring_function.score(200)
  
      # -0.5 * 200 * 1 / 0.9 * sqrt(2) - 0.5 * ((2 - 1) * 10 + (6 - 1) * 20)
      self.assertAlmostEqual(-212.135, score_1, places=3)
      # -0.5 * 200 * 2 / 0.9 * sqrt(2) - 0.5 * ((6 - 2) * 20)
      self.assertAlmostEqual(-354.270, score_2, places=3)
      # -0.5 * 200 * 5 / 0.9 * sqrt(2) - 0.5 * ((6 - 5) * 20)
      self.assertAlmostEqual(-795.674, score_5, places=3)
      # -0.5 * 200 * 6 / 0.9 * sqrt(2) - 0.5 * 0
      self.assertAlmostEqual(-942.809, score_6, places=3)
      # -0.5 * 200 * 60 / 0.9 * sqrt(2) - 0.5 * 0
      self.assertAlmostEqual(-9428.09, score_60, places=2)
      # -0.5 * 200 * 61 / 0.9 * sqrt(2) - 0.5 * 0
      self.assertAlmostEqual(-9585.23, score_61, places=2)
      # -0.5 * 200 * 101 / 0.9 * sqrt(2) - 0.5 * 0
      self.assertAlmostEqual(-15870.6, score_101, places=1)
      # -0.5 * 200 * 200 / 0.9 * sqrt(2) - 0.5 * 0
      self.assertAlmostEqual(-31427.0, score_200, places=1)
  
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 4 for calling the L0ScoringFunctionTest obj's underlying member method code with example usage: obj.test_score_laplace_noise_valid_values_calculates_score_correctly() without return types