code: def _ssim_check_inputs(
      preds: Tensor, target: Tensor
  ) -> Tuple[Tensor, Tensor]:
      """Update and returns variables required to compute Structural Similarity Index Measure.
  
      Args:
          preds: Predicted tensor
          target: Ground truth tensor
  
      """
      if preds.dtype != target.dtype:
          target = target.to(preds.dtype)
      _check_same_shape(preds, target)
      if len(preds.shape) not in (4, 5):
          raise ValueError(
              "Expected `preds` and `target` to have BxCxHxW or BxCxDxHxW shape."
              f" Got preds: {preds.shape} and target: {target.shape}."
          )
      return preds, target
  
file_path: torchmetrics/src/torchmetrics/functional/image/ssim.py
imports: from typing import List, Optional, Sequence, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import functional
  from typing_extensions import Literal
  from torchmetrics.functional.image.helper import _gaussian_kernel_2d, _gaussian_kernel_3d, _reflection_pad_3d
  from torchmetrics.utilities.checks import _check_same_shape
  from torchmetrics.utilities.distributed import reduce
label_desc: Use image node_id 1 for calling a global function with example usage: _ssim_check_inputs(preds, target) and returns: preds,  target