code: def update(self, pred):
      self.t1 = len(pred)
      self.t2 = len(pred)
      temp = self.t1 + self.t2
      self.t3 = temp
      self.t1 = self.t3 / self.t2
  
file_path: fastNLP/tests/core/metrics/test_element_cal_element.py
imports: import pytest
  from fastNLP.core.metrics import Metric
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from .utils import find_free_network_port, setup_ddp
label_desc: Use image node_id 2 for calling the MyMetric obj's underlying member method code with example usage: obj.update(pred) without return types