class_docstr: Class to manage random ray spatial sampling.
  
  Sampling is done on a regular grid of pixels by randomizing
  column and row values, and casting rays for all pixels along the selected ones.
  
  Args:
      min_depth: sampled rays minimal depth from cameras: float
      max_depth: sampled rays maximal depth from cameras: float
      ndc: convert to normalized device coordinates: bool
      device: device for ray tensors: Union[str, torch.device]
code: def __init__(
      self,
      min_depth: float,
      max_depth: float,
      ndc: bool,
      device: Device,
      dtype: torch.dtype,
  ) -> None:
      super().__init__(min_depth, max_depth, ndc, device, dtype)
  
imports: import math
  from typing import Dict, List, Tuple
  import torch
  from kornia.core import Device, Tensor, tensor
  from kornia.geometry.camera import PinholeCamera
  from kornia.nerf.camera_utils import cameras_for_ids
  from kornia.utils._compat import torch_meshgrid
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 1 to create a new RandomGridRaySampler object from inherited base classes: RandomRaySampler with example: obj = RandomGridRaySampler(min_depth, max_depth, ndc, device, dtype)