code: def loss_per_head_sum(loss_per_head, global_step=None, batch=None):
      """
      Input: loss_per_head (list of tensors), global_step (int), batch (dict)
      Output: aggregated loss (tensor)
      """
      return sum(loss_per_head)
  
imports: import copy
  import json
  import logging
  import os
  from pathlib import Path
  import multiprocessing
  import numpy
  import torch
  from torch import nn
  from transformers import AutoConfig
  from transformers.convert_graph_to_onnx import convert, quantize
  from farm.data_handler.processor import Processor
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import PredictionHead, pick_single_fn
  from farm.utils import MLFlowLogger, stack
  import farm.conversion.transformers
label_desc: Use image node_id 1 for calling a global function with example usage: loss_per_head_sum(loss_per_head, global_step, batch) and returns: sum