code: def test(
      self,
      data: Iterable[Tuple[Collection[Any], Collection[Any]]],
      metrics: Optional[Collection[Metric]] = None,
      *,
      start_time: Optional[float] = None,
      show_examples: Optional[bool] = None,
  ) -> dict:
      self._chainer.get_main_component().model.eval()
  
      report = super(TorchTrainer, self).test(
          data=data,
          metrics=metrics,
          start_time=start_time,
          show_examples=show_examples,
      )
      self._chainer.get_main_component().model.train()
      return report
  
file_path: DeepPavlov/deeppavlov/core/trainers/torch_trainer.py
imports: from logging import getLogger
  from typing import Tuple, Optional, Iterable, Collection, Any
  from deeppavlov.core.trainers.utils import Metric
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.data_learning_iterator import DataLearningIterator
  from deeppavlov.core.trainers.nn_trainer import NNTrainer
label_desc: Use image node_id 1 for calling the TorchTrainer obj's underlying member method code with example usage: obj.test(data, metrics) and returns: report