class_docstr: Defines the interface for metrics.
docstr: Aggregates a list of metrics.
  
  The default behaviour is to return the average of the metrics.
  
  Args:
    metrics: a list of metrics, of the same class.
  
  Returns:
    The result of aggregating this metric.
docstr_tok: ["Aggregates","a","list","of","metrics",".","The","default","behaviour","is","to","return","the","average","of","the","metrics",".","Args",":","metrics",":","a","list","of","metrics",",","of","the","same","class",".","Returns",":","The","result","of","aggregating","this","metric","."]
code: def aggregate(metrics: Sequence[PyMetricType]) -> types.Float:
      """Aggregates a list of metrics.
  
      The default behaviour is to return the average of the metrics.
  
      Args:
        metrics: a list of metrics, of the same class.
  
      Returns:
        The result of aggregating this metric.
      """
      return np.mean([metric.result() for metric in metrics])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Any, Optional, Sequence, Text, Union
  from absl import logging
  import numpy
  import six
  import tensorflow
  from tf_agents.metrics import tf_metric
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 9 for calling the PyMetric obj's underlying member method code with example usage: obj.aggregate(metrics) and returns: np