class_docstr: Sums several losses into one.
  
  Args:
      num_inputs: number of input losses
      weights: a list of coefficient for merging losses
code: def __init__(self, num_inputs: int = 2, weights: List[float] = None):
      super().__init__()
      self._num_losses = num_inputs
      if weights is not None and len(weights) != num_inputs:
          raise ValueError(
              "Length of weights should be equal to the number of inputs (num_inputs)"
          )
  
      self._weights = weights
  
file_path: NeMo/nemo/collections/common/losses/aggregator.py
imports: from typing import List
  import torch
  from nemo.core.classes import Loss, typecheck
  from nemo.core.neural_types import LossType, NeuralType
label_desc: Use image node_id 3 to create a new AggregatorLoss object from inherited base classes: Loss with example: obj = AggregatorLoss(num_inputs, weights)