parameters: (self, heads, loss_merger)
docstring: _Head to merges multiple _Head objects.
  
      Args:
        heads: list of _Head objects.
        loss_merger: function that takes a list of loss tensors for the heads
          and returns the final loss tensor for the multi head.
  
      Raises:
        ValueError: if any head does not have a name.
docstring_summary: _Head to merges multiple _Head objects.
docstring_tokens: _Head to merges multiple _Head objects .
function: def __init__(self, heads, loss_merger):
      """_Head to merges multiple _Head objects.
  
      Args:
        heads: list of _Head objects.
        loss_merger: function that takes a list of loss tensors for the heads
          and returns the final loss tensor for the multi head.
  
      Raises:
        ValueError: if any head does not have a name.
      """
      self._logits_dimension = 0
      for head in heads:
        if not head.head_name:
          raise ValueError("Members of MultiHead must have names.")
        self._logits_dimension += head.logits_dimension
  
      self._heads = heads
      self._loss_merger = loss_merger
function_tokens: def __init__ ( self , heads , loss_merger ) : self . _logits_dimension = 0 for head in heads : if not head . head_name : raise ValueError ( "Members of MultiHead must have names." ) self . _logits_dimension += head . logits_dimension self . _heads = heads self . _loss_merger = loss_merger