code: def update(self, y):
      self.count += len(y)
      self.data += len(y)
  
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 2 for calling the DistMetric obj's underlying member method code with example usage: obj.update(y) without return types