class_docstr: A combiner for utility analysis sums.
class_docstr_tok: ["A","combiner","for","utility","analysis","sums","."]
code: def create_accumulator(
      self, data: Tuple[np.ndarray, np.ndarray, np.ndarray]
  ) -> AccumulatorType:
      count, partition_sum, n_partitions = data
      del count  # not used for SumCombiner
      min_bound = self._params.min_sum_per_partition
      max_bound = self._params.max_sum_per_partition
      max_partitions = self._params.max_partitions_contributed
      l0_prob_keep_contribution = np.where(
          n_partitions > 0,
          np.minimum(1, max_partitions / n_partitions),
          0,
      )
      per_partition_contribution = np.clip(
          partition_sum, min_bound, max_bound
      )
      per_partition_error = per_partition_contribution - partition_sum
      clipping_to_min_error = np.where(
          partition_sum < min_bound, per_partition_error, 0
      )
      clipping_to_max_error = np.where(
          partition_sum > max_bound, per_partition_error, 0
      )
      expected_l0_bounding_error = -per_partition_contribution * (
          1 - l0_prob_keep_contribution
      )
      var_cross_partition_error = (
          per_partition_contribution**2
          * l0_prob_keep_contribution
          * (1 - l0_prob_keep_contribution)
      )
  
      return (
          partition_sum.sum().item(),
          clipping_to_min_error.sum().item(),
          clipping_to_max_error.sum().item(),
          expected_l0_bounding_error.sum().item(),
          var_cross_partition_error.sum().item(),
      )
  
imports: import abc
  import copy
  from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple
  import numpy
  import math
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import dp_computations
  from analysis import metrics
  from analysis import poisson_binomial
  from pipeline_dp import partition_selection
label_desc: Use image node_id 2 for calling the SumCombiner obj's underlying member method code with example usage: obj.create_accumulator(data) and returns: partition_sum,  clipping_to_min_error,  clipping_to_max_error,  expected_l0_bounding_error,  var_cross_partition_error