code: def test_torchmetrics_handling(self):
      expected_names = ["r2_score", "spearman_corr_coef"]
      model = Model(
          self.pytorch_network,
          self.optimizer,
          self.loss_function,
          batch_metrics=[
              torchmetrics.R2Score(),
              torchmetrics.SpearmanCorrCoef(),
          ],
      )
      self._test_history(model, expected_names, [ANY, ANY])
  
imports: import os
  import unittest
  from unittest import skipIf
  from unittest.mock import ANY
  import numpy
  import torch
  import torch.nn
  import torchmetrics
  from poutyne import Metric, Model, do_register_metric_class, rename_doubles, unregister_metric_class
label_desc: Use image node_id 22 for calling the MetricsModelIntegrationTest obj's underlying member method code with example usage: obj.test_torchmetrics_handling() without return types