code: def _scipy_concordance(preds, target):
      preds, target = preds.numpy(), target.numpy()
      if preds.ndim == 2:
          mean_pred = np.mean(preds, axis=0)
          mean_gt = np.mean(target, axis=0)
          std_pred = np.std(preds, axis=0)
          std_gt = np.std(target, axis=0)
          pearson = np.stack(
              [pearsonr(t, p)[0] for t, p in zip(target.T, preds.T)]
          )
      else:
          mean_pred = np.mean(preds)
          mean_gt = np.mean(target)
          std_pred = np.std(preds)
          std_gt = np.std(target)
          pearson = pearsonr(target, preds)[0]
      return (
          2.0
          * pearson
          * std_pred
          * std_gt
          / (std_pred**2 + std_gt**2 + (mean_pred - mean_gt) ** 2)
      )
  
file_path: torchmetrics/tests/unittests/regression/test_concordance.py
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.stats import pearsonr
  from torchmetrics.functional.regression.concordance import concordance_corrcoef
  from torchmetrics.regression.concordance import ConcordanceCorrCoef
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  from unittests import BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling a global function with example usage: _scipy_concordance(preds, target) and returns: unknown