code: def test_full_image_output(preds, target):
      """Test that if full output should be returned, then its shape matches the input."""
      out = structural_similarity_index_measure(preds[0], target[0])
      assert isinstance(out, Tensor)
      assert out.numel() == 1
  
      out = structural_similarity_index_measure(
          preds[0], target[0], return_full_image=True
      )
      assert isinstance(out, tuple)
      assert len(out) == 2
      assert out[0].numel() == 1
      assert out[1].shape == preds[0].shape
  
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 5 for calling a global function with example usage: test_full_image_output(preds, target) without return types