class_docstr: A wrapper that evaluates multiple metrics simultaneously
  
  Arguments
  ---------
  metric : function
      The function to use to compute the relevant metrics. Should take
      at least two arguments (predictions and targets) and can
      optionally take the relative lengths of either or both arguments.
      The function should return a dict or a namedtuple
  
  batch_eval: bool
      When True it feeds the evaluation metric with the batched input.
      When False and n_jobs=1, it performs metric evaluation one-by-one
      in a sequential way. When False and n_jobs>1, the evaluation
      runs in parallel over the different inputs using joblib.
  n_jobs : int
      The number of jobs to use for computing the metric. If this is
      more than one, every sample is processed individually, otherwise
      the whole batch is passed at once.
  
  Example
  -------
  >>> def metric(a, b):
  ...    return {
  ...        "sum": a + b,
  ...        "diff": a - b,
  ...        "sum_sq": a**2 + b**2
  ...    }
  >>> multi_metric = MultiMetricStats(metric, batch_eval=True)
  >>> multi_metric.append([1, 2], a=torch.tensor([2.0, 1.0]), b=torch.tensor([1.0, 2.0]))
  >>> multi_metric.append([3, 4], a=torch.tensor([4.0, 5.0]), b=torch.tensor([0.0, 1.0]))
  >>> multi_metric.append([5, 6], a=torch.tensor([2.0, 4.0]), b=torch.tensor([4.0, 2.0]))
  >>> multi_metric.append([7, 8], a=torch.tensor([2.0, 4.0]), b=torch.tensor([4.0, 2.0]))
  >>> multi_metric.summarize() #doctest: +NORMALIZE_WHITESPACE
  {'sum': {'average': 5.0,
    'min_score': 3.0,
    'min_id': 1,
    'max_score': 6.0,
    'max_id': 4},
   'diff': {'average': 1.0,
    'min_score': -2.0,
    'min_id': 5,
    'max_score': 4.0,
    'max_id': 3},
   'sum_sq': {'average': 16.5,
    'min_score': 5.0,
    'min_id': 1,
    'max_score': 26.0,
    'max_id': 4}}
  >>> multi_metric.summarize(flat=True) #doctest: +NORMALIZE_WHITESPACE
  {'sum_average': 5.0,
   'sum_min_score': 3.0,
   'sum_min_id': 1,
   'sum_max_score': 6.0,
   'sum_max_id': 4,
   'diff_average': 1.0,
   'diff_min_score': -2.0,
   'diff_min_id': 5,
   'diff_max_score': 4.0,
   'diff_max_id': 3,
   'sum_sq_average': 16.5,
   'sum_sq_min_score': 5.0,
   'sum_sq_min_id': 1,
   'sum_sq_max_score': 26.0,
   'sum_sq_max_id': 4}
docstr: Summarize the metric scores, returning relevant stats.
  
  Arguments
  ---------
  field : str
      If provided, only returns selected statistic. If not,
      returns all computed statistics.
  flat: bool
      whether to flatten the dictionary
  
  Returns
  -------
   dict
      Returns a dictionary of all computed stats
docstr_tok: ["Summarize","the","metric","scores",",","returning","relevant","stats",".","Arguments","--","--","--","--","-","field",":","str","If","provided",",","only","returns","selected","statistic",".","If","not",",","returns","all","computed","statistics",".","flat",":","bool","whether","to","flatten","the","dictionary","Returns","--","--","--","-","dict","Returns","a","dictionary","of","all","computed","stats"]
code: def summarize(self, field=None, flat=False):
      """Summarize the metric scores, returning relevant stats.
  
      Arguments
      ---------
      field : str
          If provided, only returns selected statistic. If not,
          returns all computed statistics.
      flat: bool
          whether to flatten the dictionary
  
      Returns
      -------
       dict
          Returns a dictionary of all computed stats
      """
  
      result = {
          key: metric.summarize(field)
          for key, metric in self.metrics.items()
      }
      if flat:
          result = {
              f"{key}_{field}": value
              for key, fields in result.items()
              for field, value in fields.items()
          }
      return result
  
imports: import torch
  from joblib import Parallel, delayed
  from speechbrain.utils.data_utils import undo_padding
  from speechbrain.utils.edit_distance import wer_summary, wer_details_for_batch
  from speechbrain.dataio.dataio import merge_char, split_word, extract_concepts_values
  from speechbrain.dataio.wer import print_wer_summary, print_alignments
label_desc: Use image node_id 4 for calling the MultiMetricStats obj's underlying member method code with example usage: obj.summarize(field, flat) and returns: result