class_docstr: Test class for `SpectralDistortionIndex` metric.
class_docstr_tok: ["Test","class","for","`","SpectralDistortionIndex","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_d_lambda(self, preds, target, p, ddp):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp,
          preds,
          target,
          SpectralDistortionIndex,
          partial(_np_d_lambda, p=p),
          metric_args={"p": p},
      )
  
imports: from functools import partial
  from typing import NamedTuple
  import numpy
  import pytest
  import torch
  from torch import Tensor
  from torchmetrics.functional.image.d_lambda import spectral_distortion_index
  from torchmetrics.functional.image.uqi import universal_image_quality_index
  from torchmetrics.image.d_lambda import SpectralDistortionIndex
  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 1 for calling the TestSpectralDistortionIndex obj's underlying member method code with example usage: obj.test_d_lambda(preds, target, p, ddp) without return types