docstr: Normalise all mechanism weights so that they sum up to the weight of the current scope.
docstr_tok: ["Normalise","all","mechanism","weights","so","that","they","sum","up","to","the","weight","of","the","current","scope","."]
code: def _normalise_mechanism_weights(self):
      """Normalise all mechanism weights so that they sum up to the weight of the current scope."""
  
      if not self.mechanisms:
          return
  
      total_weight = sum([m.weight for m in self.mechanisms])
      normalisation_factor = self.weight / total_weight
      for mechanism in self.mechanisms:
          mechanism.weight *= normalisation_factor
  
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 4 for calling the BudgetAccountantScope obj's underlying member method code with example usage: obj._normalise_mechanism_weights() without return types