class_docstr: Test class for `SpatialDistortionIndex` metric.
class_docstr_tok: ["Test","class","for","`","SpatialDistortionIndex","`","metric","."]
docstr: Test dtype support of the metric on GPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","GPU","."]
code: def test_d_s_half_gpu(
      self, preds, target, ms, pan, pan_lr, norm_order, window_size
  ):
      """Test dtype support of the metric on GPU."""
      self.run_precision_test_gpu(
          preds,
          target,
          SpatialDistortionIndex,
          partial(
              _invoke_spatial_distortion_index,
              ms=ms,
              pan=pan,
              pan_lr=pan_lr,
              norm_order=norm_order,
              window_size=window_size,
          ),
          {"norm_order": norm_order, "window_size": window_size},
      )
  
imports: from functools import partial
  from typing import Dict, List, NamedTuple
  import numpy
  import pytest
  import torch
  from scipy.ndimage import uniform_filter
  from skimage.transform import resize
  from torch import Tensor
  from torchmetrics.functional.image.d_s import spatial_distortion_index
  from torchmetrics.functional.image.uqi import universal_image_quality_index
  from torchmetrics.image.d_s import SpatialDistortionIndex
  from unittests import BATCH_SIZE, NUM_BATCHES
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 3 for calling the TestSpatialDistortionIndex obj's underlying member method code with example usage: obj.test_d_s_half_gpu(preds, target, ms, pan, pan_lr, norm_order, window_size) without return types