class_docstr: Test individual Metric classes.
class_docstr_tok: ["Test","individual","Metric","classes","."]
code: def test_macroaverage_additions(self):
      m1 = AverageMetric(1, 3)
      m2 = AverageMetric(3, 4)
  
      assert (m1 + m2) == AverageMetric(4, 7)
      assert MacroAverageMetric({"a": m1, "b": m2}) == 0.5 * (
          1.0 / 3 + 3.0 / 4
      )
  
imports: import unittest
  from typing import Dict
  import torch
  import random
  from parlai.core.metrics import AverageMetric, SumMetric, FixedMetric, Metrics, GlobalAverageMetric, MacroAverageMetric, TimerMetric, aggregate_unnamed_reports, aggregate_named_reports, InterDistinctMetric, IntraDistinctMetric, FairseqBleuMetric
  from parlai.core.torch_classifier_agent import ConfusionMatrixMetric, WeightedF1Metric, AUCMetrics
  from parlai.core.torch_generator_agent import PPLMetric
  import parlai.utils.testing
label_desc: Use image node_id 6 for calling the TestMetric obj's underlying member method code with example usage: obj.test_macroaverage_additions() without return types