code: def _wrapped_reference_scc(win, ws, reduction):
      """Wrapper around reference implementation of scc from sewar."""
  
      def _wrapped(preds, target):
          preds = torch.movedim(preds, 1, -1)
          target = torch.movedim(target, 1, -1)
          preds = preds.cpu().numpy()
          target = target.cpu().numpy()
          scc = [
              sewar_scc(
                  GT=target[batch], P=preds[batch], win=win, ws=ws
              )
              for batch in range(preds.shape[0])
          ]
          if reduction == "mean":
              return np.mean(scc)
          if reduction == "none":
              return scc
          return None
  
      return _wrapped
  
file_path: torchmetrics/tests/unittests/image/test_scc.py
imports: import numpy
  import pytest
  import torch
  from sewar.full_ref import scc
  from torchmetrics.functional.image import spatial_correlation_coefficient
  from torchmetrics.image import SpatialCorrelationCoefficient
  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: _wrapped_reference_scc(win, ws, reduction) and returns: _wrapped, None, np, scc