code: def _batch_aggregation(batch_loss_list, reduction=None):
      """Returns the aggregated loss."""
      loss_sum = 0.0
      weight_sum = 0.0
      for loss, weight, count in batch_loss_list:
          loss_sum += loss
          if reduction == "mean":
              weight_sum += weight
          else:
              weight_sum += count
      return loss_sum / weight_sum
  
imports: import math
  import tensorflow
  from tensorflow_ranking.python import losses
  from tensorflow_ranking.python import losses_impl
label_desc: Use image node_id 4 for calling a global function with example usage: _batch_aggregation(batch_loss_list, reduction) and returns: unknown