class_docstr: Composition of multiple `_RankingHead.
  
  The main functionality is to create an estimator spec that
    - merges all predictions from all heads.
    - merges all eval metrics from all heads.
    - combines all the losses using weights from all heads.
class_docstr_tok: ["Composition","of","multiple","`","_RankingHead",".","The","main","functionality","is","to","create","an","estimator","spec","that","-","merges","all","predictions","from","all","heads",".","-","merges","all","eval","metrics","from","all","heads",".","-","combines","all","the","losses","using","weights","from","all","heads","."]
docstr: Merges the eval metrics from all heads.
docstr_tok: ["Merges","the","eval","metrics","from","all","heads","."]
code: def _merge_metrics(self, all_estimator_spec):
      """Merges the eval metrics from all heads."""
      # TODO: Add the per-head loss loss/head_name to metrics.
      eval_metric_ops = {}
      for head, spec in zip(self._heads, all_estimator_spec):
          eval_metric_ops.update(
              {
                  "{}/{}".format(head.name, name): op
                  for name, op in six.iteritems(spec.eval_metric_ops)
              }
          )
      return eval_metric_ops
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  import tensorflow
  from tensorflow import estimator
label_desc: Use image node_id 6 for calling the _MultiRankingHead obj's underlying member method code with example usage: obj._merge_metrics(all_estimator_spec) and returns: eval_metric_ops