code: def _check_disparity_tensor(disparity_tensor: Tensor) -> None:
      r"""Utility function to ensure correct user provided correct disparity tensor.
  
      Args:
          disparity_tensor: The disparity tensor of shape :math:`(B, 1, H, W)`.
      """
      if not isinstance(disparity_tensor, Tensor):
          raise StereoException(
              f"Expected 'disparity_tensor' to be an instance of Tensor but got {type(disparity_tensor)}."
          )
  
      if len(disparity_tensor.shape) != 4:
          raise StereoException(
              f"Expected 'disparity_tensor' to have 4 dimensions. Got {disparity_tensor.shape}."
          )
  
      if disparity_tensor.shape[-1] != 1:
          raise StereoException(
              "Expected dimension 1 of 'disparity_tensor' to be 1 for as single channeled disparity map."
              f"Got {disparity_tensor.shape}."
          )
  
      if disparity_tensor.dtype not in (
          torch.float16,
          torch.float32,
          torch.float64,
      ):
          raise StereoException(
              "Expected 'disparity_tensor' to have dtype torch.float16, torch.float32 or torch.float64."
              f"Got {disparity_tensor.dtype}"
          )
  
imports: from typing import Any
  import torch
  from kornia.core import Tensor, stack, zeros
  from kornia.geometry.linalg import transform_points
  from kornia.utils.grid import create_meshgrid
label_desc: Use image node_id 1 for calling a global function with example usage: _check_disparity_tensor(disparity_tensor) without return types