code: def test_ssim_uint8(
      available_device,
      shape,
      kernel_size,
      gaussian,
      use_sample_covariance,
  ):
      y_pred = torch.randint(
          0, 255, shape, device=available_device, dtype=torch.uint8
      )
      y = (y_pred * 0.8).to(dtype=torch.uint8)
  
      sigma = 1.5
      data_range = 255
      ssim = SSIM(
          data_range=data_range, sigma=sigma, device=available_device
      )
      ssim.update((y_pred, y))
      ignite_ssim = ssim.compute()
  
      skimg_pred = y_pred.cpu().numpy()
      skimg_y = (skimg_pred * 0.8).astype(np.uint8)
      skimg_ssim = ski_ssim(
          skimg_pred,
          skimg_y,
          win_size=kernel_size,
          sigma=sigma,
          channel_axis=1,
          gaussian_weights=gaussian,
          data_range=data_range,
          use_sample_covariance=use_sample_covariance,
      )
  
      assert isinstance(ignite_ssim, float)
      assert np.allclose(ignite_ssim, skimg_ssim, atol=1e-5)
  
file_path: ignite/tests/ignite/metrics/test_ssim.py
imports: from typing import Sequence, Union
  import numpy
  import pytest
  import torch
  from skimage.metrics import structural_similarity
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics import SSIM
label_desc: Use image node_id 9 for calling a global function with example usage: test_ssim_uint8(available_device, shape, kernel_size, gaussian, use_sample_covariance) without return types