class_docstr: Computes probability of keeping the partition.
  
  Args:
      probabilities: probabilities that each specific user contributes to the
      partition after contribution bounding.
      moments: contains moments of the sum of independent random
      variables, which represent whether user contributes to the partition.
  
  Those variables are set mutually exclusive. If len(probabilities) <=
  MAX_PROBABILITIES_IN_ACCUMULATOR then 'probabilities' are used otherwise
  'moments'. The idea is that when the number of the contributions are small
  the sum of the random variables is far from Normal distribution and exact
  computations are performed, otherwise a Normal approximation based on
  moments is used.
class_docstr_tok: ["Computes","probability","of","keeping","the","partition",".","Args",":","probabilities",":","probabilities","that","each","specific","user","contributes","to","the","partition","after","contribution","bounding",".","moments",":","contains","moments","of","the","sum","of","independent","random","variables",",","which","represent","whether","user","contributes","to","the","partition",".","Those","variables","are","set","mutually","exclusive",".","If","len","(","probabilities",")","<","=","MAX_PROBABILITIES_IN_ACCUMULATOR","then","'probabilities","'","are","used","otherwise","'moments","'",".","The","idea","is","that","when","the","number","of","the","contributions","are","small","the","sum","of","the","random","variables","is","far","from","Normal","distribution","and","exact","computations","are","performed",",","otherwise","a","Normal","approximation","based","on","moments","is","used","."]
docstr: Computes the pmf of privacy id count in this partition after contribution bounding.
code: def _compute_pmf(self) -> poisson_binomial.PMF:
      """Computes the pmf of privacy id count in this partition after contribution bounding."""
      if self.probabilities:
          return poisson_binomial.compute_pmf(self.probabilities)
  
      moments = self.moments
      std = math.sqrt(moments.variance)
      skewness = (
          0 if std == 0 else moments.third_central_moment / std**3
      )
      return poisson_binomial.compute_pmf_approximation(
          moments.expectation, std, skewness, moments.count
      )
  
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 3 for calling the PartitionSelectionCalculator obj's underlying member method code with example usage: obj._compute_pmf() and returns: poisson_binomial, poisson_binomial