class_docstr: Base class for budget accountants.
class_docstr_tok: ["Base","class","for","budget","accountants","."]
code: def __init__(
      self,
      total_epsilon: float,
      total_delta: float,
      num_aggregations: Optional[int],
      aggregation_weights: Optional[list],
  ):
      input_validators.validate_epsilon_delta(
          total_epsilon, total_delta, "BudgetAccountant"
      )
      self._total_epsilon = total_epsilon
      self._total_delta = total_delta
  
      self._scopes_stack = []
      self._mechanisms = []
      self._finalized = False
      if (
          num_aggregations is not None
          and aggregation_weights is not None
      ):
          raise ValueError(
              "'num_aggregations' and 'aggregation_weights' can not be set "
              "simultaneously.\nIf you wish all aggregations in the pipeline "
              "to have equal budgets, specify the total number of aggregations"
              "with 'n_aggregations'.\nIf you wish to have different budgets "
              "for different aggregations, specify them with 'aggregation_weights'"
          )
      if num_aggregations is not None and num_aggregations <= 0:
          raise ValueError(
              f"'num_aggregations'={num_aggregations}, but it has to be positive."
          )
      self._expected_num_aggregations = num_aggregations
      self._expected_aggregation_weights = aggregation_weights
      self._reqested_aggregations = 0
      self._actual_aggregation_weights = []
  
imports: import abc
  import collections
  import logging
  import math
  from typing import Optional
  from dataclasses import dataclass
  import pipeline_dp.aggregate_params
  from pipeline_dp import input_validators
label_desc: Use image node_id 1 to create a new BudgetAccountant object from inherited base classes: abc with example: obj = BudgetAccountant(total_epsilon, total_delta, num_aggregations, aggregation_weights)