class_docstr: Test the Metrics aggregator.
class_docstr_tok: ["Test","the","Metrics","aggregator","."]
code: def test_shared(self):
      m = Metrics()
      m2 = Metrics(shared=m.share())
      m3 = Metrics(shared=m.share())
  
      m2.add("key", SumMetric(1))
      m3.add("key", SumMetric(2))
      m.add("key", SumMetric(3))
  
      assert m.report()["key"] == 6
  
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 2 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_shared() without return types