code: def _test_metric(
      self,
      pred,
      true,
      sklearn_metrics,
      with_sample_weight,
      *,
      kwargs=None,
      names=None,
  ):
      epoch_metric = SKLearnMetrics(
          sklearn_metrics, kwargs=kwargs, names=names
      )
      batch_metric = SKLearnMetrics(
          sklearn_metrics, kwargs=kwargs, names=names
      )
  
      if with_sample_weight:
          loader = self._get_data_loader(
              pred, (true, self.sample_weight)
          )
      else:
          loader = self._get_data_loader(pred, true)
  
      expected = self._get_expected_value(
          pred,
          true,
          sklearn_metrics,
          with_sample_weight,
          kwargs=kwargs,
          names=names,
      )
  
      with torch.no_grad():
          for y_pred, y_true in loader:
              epoch_metric.update(y_pred, y_true)
              batch_metric(y_pred, y_true)
      actual_epoch_metric = epoch_metric.compute()
      actual_batch_metric = batch_metric.compute()
  
      self.assertEqual(expected, actual_epoch_metric)
      self.assertEqual(expected, actual_batch_metric)
  
file_path: poutyne/tests/framework/metrics/test_sklearn_metrics.py
imports: from itertools import repeat
  from unittest import TestCase, skipIf
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from poutyne import SKLearnMetrics, TensorDataset
label_desc: Use image node_id 10 for calling the SKLearnMetricsTest obj's underlying member method code with example usage: obj._test_metric(pred, true, sklearn_metrics, with_sample_weight) without return types