code: def __init__(self, weights_dict: Dict[str, float]):
      self.weights_dict = weights_dict
      self.total_weights = sum([x for x in weights_dict.values()])
  
imports: import abc
  import numexpr
  import numpy
  from typing import Union, Optional, Dict
label_desc: Use image node_id 1 to create a new WeightedMetricAggregator object from inherited base classes: BaseMetricAggregator with example: obj = WeightedMetricAggregator(weights_dict)