code: def GridRaysampler(
      min_x: float,
      max_x: float,
      min_y: float,
      max_y: float,
      image_width: int,
      image_height: int,
      n_pts_per_ray: int,
      min_depth: float,
      max_depth: float,
  ) -> "MultinomialRaysampler":
      """
      GridRaysampler has been DEPRECATED. Use MultinomialRaysampler instead.
      Preserving GridRaysampler for backward compatibility.
      """
  
      warnings.warn(
          """GridRaysampler is deprecated,
          Use MultinomialRaysampler instead.
          GridRaysampler will be removed in future releases.""",
          PendingDeprecationWarning,
      )
  
      return MultinomialRaysampler(
          min_x=min_x,
          max_x=max_x,
          min_y=min_y,
          max_y=max_y,
          image_width=image_width,
          image_height=image_height,
          n_pts_per_ray=n_pts_per_ray,
          min_depth=min_depth,
          max_depth=max_depth,
      )
  
imports: import warnings
  from typing import Optional, Tuple, Union
  import torch
  from pytorch3d.common.compat import meshgrid_ij
  from pytorch3d.ops import padded_to_packed
  from pytorch3d.renderer.cameras import CamerasBase
  from pytorch3d.renderer.implicit.utils import HeterogeneousRayBundle, RayBundle
  from torch.nn import functional
label_desc: Use image node_id 1 for calling a global function with example usage: GridRaysampler(min_x, max_x, min_y, max_y, image_width, image_height, n_pts_per_ray, min_depth, max_depth) and returns: MultinomialRaysampler