code: def __init__(self, aggregate_when_get_metric=None):
      super().__init__(
          aggregate_when_get_metric=aggregate_when_get_metric
      )
      self.register_element("count", value=0, aggregate_method="sum")
      self.data = 0
  
imports: import pytest
  from fastNLP import Metric, Evaluator
  from dataclasses import dataclass
  from typing import Any
  from itertools import product
  from fastNLP.core.controllers.trainer import Trainer
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from tests.helpers.datasets.torch_data import TorchNormalDataset_Classification, TorchArgMaxDataset
  from tests.helpers.utils import magic_argv_env_context
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP import Event
label_desc: Use image node_id 1 to create a new DistMetric object from inherited base classes: Metric with example: obj = DistMetric(aggregate_when_get_metric)