class_docstr: Performs DP aggregations.
class_docstr_tok: ["Performs","DP","aggregations","."]
docstr: Creates ContributionBounder based on aggregation parameters.
docstr_tok: ["Creates","ContributionBounder","based","on","aggregation","parameters","."]
code: def _create_contribution_bounder(
      self,
      params: pipeline_dp.AggregateParams,
      expects_per_partition_sampling: bool,
  ) -> contribution_bounders.ContributionBounder:
      """Creates ContributionBounder based on aggregation parameters."""
      if params.max_contributions:
          return (
              contribution_bounders.SamplingPerPrivacyIdContributionBounder()
          )
      if expects_per_partition_sampling:
          return (
              contribution_bounders.SamplingCrossAndPerPartitionContributionBounder()
          )
      return (
          contribution_bounders.SamplingCrossPartitionContributionBounder()
      )
  
imports: import functools
  from typing import Any, Callable, Optional, Sequence, Tuple, Union
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import combiners
  from pipeline_dp import contribution_bounders
  from pipeline_dp import dp_computations
  from pipeline_dp import partition_selection
  from pipeline_dp import pipeline_functions
  from pipeline_dp import report_generator
  from pipeline_dp import sampling_utils
  from pipeline_dp.dataset_histograms import computing_histograms
  from pipeline_dp.private_contribution_bounds import PrivateL0Calculator
label_desc: Use image node_id 16 for calling the DPEngine obj's underlying member method code with example usage: obj._create_contribution_bounder(params, expects_per_partition_sampling) and returns: contribution_bounders, contribution_bounders, contribution_bounders