code: def _single_target_ref_metric(preds, target, squared):
      sk_preds = preds.view(-1).numpy()
      sk_target = target.view(-1).numpy()
      return _sk_rse(sk_target, sk_preds, squared=squared)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from torchmetrics.functional import relative_squared_error
  from torchmetrics.regression import RelativeSquaredError
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling a global function with example usage: _single_target_ref_metric(preds, target, squared) and returns: _sk_rse