class_docstr: Calculates differentially-private l0 bound (i.e. max_partitions_contributed).
docstr: Chooses l0 contribution bound in a differentially private way.
  
  Returns a one element pCollection containing the value for the l0
  bound.
docstr_tok: ["Chooses","l0","contribution","bound","in","a","differentially","private","way",".","Returns","a","one","element","pCollection","containing","the","value","for","the","l0","bound","."]
code: def calculate(self):
      """Chooses l0 contribution bound in a differentially private way.
  
      Returns a one element pCollection containing the value for the l0
      bound."""
      l0_histogram = self._backend.to_multi_transformable_collection(
          self._backend.map(
              self._histograms,
              lambda h: h.l0_contributions_histogram,
              "Extract l0_contributions_histogram from DatasetHistograms",
          )
      )
      number_of_partitions = self._calculate_number_of_partitions()
  
      l0_calculation_input_col = (
          pipeline_functions.collect_to_container(
              self._backend,
              {
                  "l0_histogram": l0_histogram,
                  "number_of_partitions": number_of_partitions,
              },
              PrivateL0Calculator.Inputs,
              "Collecting L0 calculation inputs into one object",
          )
      )
      return self._backend.map(
          l0_calculation_input_col,
          self._calculate_l0,
          "Calculate private l0 bound",
      )
  
imports: from dataclasses import dataclass
  from functools import lru_cache
  from typing import List
  import pipeline_dp
  from pipeline_dp import dp_computations
  from pipeline_dp.dataset_histograms.histograms import Histogram
  from pipeline_dp import pipeline_functions
label_desc: Use image node_id 2 for calling the PrivateL0Calculator obj's underlying member method code with example usage: obj.calculate() and returns: self