code: def depth_warp(
      pinhole_dst: PinholeCamera,
      pinhole_src: PinholeCamera,
      depth_src: Tensor,
      patch_dst: Tensor,
      height: int,
      width: int,
      align_corners: bool = True,
  ) -> Tensor:
      r"""Function that warps a tensor from destination frame to reference given the depth in the reference frame.
  
      See :class:`~kornia.geometry.warp.DepthWarper` for details.
  
      Example:
          >>> # pinholes camera models
          >>> pinhole_dst = PinholeCamera(torch.randn(1, 4, 4), torch.randn(1, 4, 4),
          ... torch.tensor([32]), torch.tensor([32]))
          >>> pinhole_src = PinholeCamera(torch.randn(1, 4, 4), torch.randn(1, 4, 4),
          ... torch.tensor([32]), torch.tensor([32]))
          >>> # warp the destination frame to reference by depth
          >>> depth_src = torch.ones(1, 1, 32, 32)  # Nx1xHxW
          >>> image_dst = torch.rand(1, 3, 32, 32)  # NxCxHxW
          >>> image_src = depth_warp(pinhole_dst, pinhole_src, depth_src, image_dst, 32, 32)  # NxCxHxW
      """
      warper = DepthWarper(
          pinhole_dst, height, width, align_corners=align_corners
      )
      warper.compute_projection_matrix(pinhole_src)
      return warper(depth_src, patch_dst)
  
imports: from __future__ import annotations
  from typing import Optional
  import torch
  import kornia.core
  from kornia.core import Module, Tensor, tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from kornia.filters.sobel import spatial_gradient
  from kornia.utils import create_meshgrid
  from kornia.utils.helpers import deprecated
  from .camera import PinholeCamera, cam2pixel, pixel2cam, project_points, unproject_points
  from .conversions import normalize_pixel_coordinates, normalize_points_with_intrinsics
  from .linalg import compose_transformations, convert_points_to_homogeneous, inverse_transformation, transform_points
label_desc: Use image node_id 6 for calling a global function with example usage: depth_warp(pinhole_dst, pinhole_src, depth_src, patch_dst, height, width, align_corners) and returns: warper