code: def __init__(
      self,
      loss,
      loss_weights=None,
      reduction="sum_over_batch_size",
      output_names=None,
  ):
      if loss_weights and not isinstance(
          loss_weights, (list, tuple, dict)
      ):
          raise ValueError(
              "Expected `loss_weights` argument to be a list, tuple, or "
              f"dict. Received instead: loss_weights={loss_weights} "
              f"of type {type(loss_weights)}"
          )
      self._user_loss = loss
      self._user_loss_weights = loss_weights
      self.built = False
      self.output_names = output_names
      super().__init__(name="compile_loss", reduction=reduction)
  
imports: import tree
  from keras import backend
  from keras import losses
  from keras import metrics
  from keras import ops
  from keras.utils.naming import get_object_name
label_desc: Use image node_id 1 to create a new CompileLoss object from inherited base classes: losses_module with example: obj = CompileLoss(loss, loss_weights, reduction, output_names)