class_docstr: Interface for objects which perform contribution bounding.
class_docstr_tok: ["Interface","for","objects","which","perform","contribution","bounding","."]
docstr: Bound contributions of privacy id.
  
  Contribution bounding is performed to ensure that sensitivity of the
  aggregations to anonymize are limited. There are many ways how to
  perform contribution bounding. Sub-classes implement specific contribution
  strategies.
  
  This function also performs the aggregation step per
  (privacy_id, partition_key) by calling aggregate_fn on data points
  corresponding to each (privacy_id, partition_key).
  
  Args:
    col: collection, with types of each element: (privacy_id,
      partition_key, value).
    params: contains parameters needed for contribution bounding.
    backend: pipeline backend for performing operations on collections.
    aggregate_fn: function that takes a list of values and returns an
      aggregator object.
  Returns:
    collection with elements ((privacy_id, partition_key),
        accumulator).
docstr_tok: ["Bound","contributions","of","privacy","id",".","Contribution","bounding","is","performed","to","ensure","that","sensitivity","of","the","aggregations","to","anonymize","are","limited",".","There","are","many","ways","how","to","perform","contribution","bounding",".","Sub-classes","implement","specific","contribution","strategies",".","This","function","also","performs","the","aggregation","step","per","(","privacy_id",",","partition_key",")","by","calling","aggregate_fn","on","data","points","corresponding","to","each","(","privacy_id",",","partition_key",")",".","Args",":","col",":","collection",",","with","types","of","each","element",":","(","privacy_id",",","partition_key",",","value",")",".","params",":","contains","parameters","needed","for","contribution","bounding",".","backend",":","pipeline","backend","for","performing","operations","on","collections",".","aggregate_fn",":","function","that","takes","a","list","of","values","and","returns","an","aggregator","object",".","Returns",":","collection","with","elements","(","(","privacy_id",",","partition_key",")",",","accumulator",")","."]
code: def bound_contributions(
      self,
      col,
      params: pipeline_dp.AggregateParams,
      backend: pipeline_backend.PipelineBackend,
      aggregate_fn: Callable,
  ):
      """Bound contributions of privacy id.
  
      Contribution bounding is performed to ensure that sensitivity of the
      aggregations to anonymize are limited. There are many ways how to
      perform contribution bounding. Sub-classes implement specific contribution
      strategies.
  
      This function also performs the aggregation step per
      (privacy_id, partition_key) by calling aggregate_fn on data points
      corresponding to each (privacy_id, partition_key).
  
      Args:
        col: collection, with types of each element: (privacy_id,
          partition_key, value).
        params: contains parameters needed for contribution bounding.
        backend: pipeline backend for performing operations on collections.
        aggregate_fn: function that takes a list of values and returns an
          aggregator object.
      Returns:
        collection with elements ((privacy_id, partition_key),
            accumulator).
      """
  
file_path: pipelinedp/pipeline_dp/contribution_bounders.py
imports: import abc
  import collections
  from typing import Callable, Iterable
  import pipeline_dp
  from pipeline_dp import pipeline_backend
  from pipeline_dp import sampling_utils
label_desc: Use image node_id 1 for calling the ContributionBounder obj's underlying member method code with example usage: obj.bound_contributions(col, params, backend, aggregate_fn) without return types