code: def add_metric(self, name, calculator, is_train):
      metrics = self.metrics
      metrics[name] = {}
      metrics[name]["calculator"] = calculator
      metrics[name]["is_train"] = is_train
      metrics[name]["output"] = []
  
imports: from abc import abstractmethod
  from caffe2.python import workspace
  from caffe2.python import timeout_guard
  from caffe2.python import data_parallel_model
  from .None import checkpoint
  from .None import ModuleRegister
  from .None import module_map
  import os
  import inspect
  import time
  import logging
label_desc: Use image node_id 7 for calling the AnyExpTrainer obj's underlying member method code with example usage: obj.add_metric(name, calculator, is_train) without return types