code: def test_uqi_different_dtype():
      """Check that an type error is raised if preds and target have different dtype."""
      pred_t = torch.rand([1, 1, 16, 16])
      target_t = torch.rand([1, 1, 16, 16], dtype=torch.float64)
      with pytest.raises(
          TypeError,
          match="Expected `preds` and `target` to have the same data type.*",
      ):
          universal_image_quality_index(pred_t, target_t)
  
imports: from functools import partial
  from typing import NamedTuple
  import pytest
  import torch
  from skimage.metrics import structural_similarity
  from torch import Tensor
  from torchmetrics.functional.image.uqi import universal_image_quality_index
  from torchmetrics.image.uqi import UniversalImageQualityIndex
  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 a global function with example usage: test_uqi_different_dtype() without return types