code: def _pt_ssim(
      preds,
      target,
      data_range,
      sigma,
      kernel_size=11,
      reduction_arg="elementwise_mean",
  ):
      results = ssim(
          target,
          preds,
          data_range=data_range,
          win_size=kernel_size,
          win_sigma=sigma,
          size_average=False,
      )
  
      return results if reduction_arg != "sum" else results.sum()
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from pytorch_msssim import ssim
  from skimage.metrics import structural_similarity
  from torch import Tensor
  from torchmetrics.functional import structural_similarity_index_measure
  from torchmetrics.image import StructuralSimilarityIndexMeasure
  from unittests import 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: _pt_ssim(preds, target, data_range, sigma, kernel_size, reduction_arg) and returns: unknown