code: def warp_frame_depth(
      image_src: Tensor,
      depth_dst: Tensor,
      src_trans_dst: Tensor,
      camera_matrix: Tensor,
      normalize_points: bool = False,
  ) -> Tensor:
      """Warp a tensor from a source to destination frame by the depth in the destination.
  
      Compute 3d points from the depth, transform them using given transformation, then project the point cloud to an
      image plane.
  
      Args:
          image_src: image tensor in the source frame with shape :math:`(B,D,H,W)`.
          depth_dst: depth tensor in the destination frame with shape :math:`(B,1,H,W)`.
          src_trans_dst: transformation matrix from destination to source with shape :math:`(B,4,4)`.
          camera_matrix: tensor containing the camera intrinsics with shape :math:`(B,3,3)`.
          normalize_points: whether to normalize the pointcloud. This must be set to ``True`` when the depth
             is represented as the Euclidean ray length from the camera position.
  
      Return:
          the warped tensor in the source frame with shape :math:`(B,3,H,W)`.
      """
      if not isinstance(image_src, Tensor):
          raise TypeError(
              f"Input image_src type is not a Tensor. Got {type(image_src)}."
          )
  
      if not len(image_src.shape) == 4:
          raise ValueError(
              f"Input image_src musth have a shape (B, D, H, W). Got: {image_src.shape}"
          )
  
      if not isinstance(depth_dst, Tensor):
          raise TypeError(
              f"Input depht_dst type is not a Tensor. Got {type(depth_dst)}."
          )
  
      if not (len(depth_dst.shape) == 4 and depth_dst.shape[-3] == 1):
          raise ValueError(
              f"Input depth_dst musth have a shape (B, 1, H, W). Got: {depth_dst.shape}"
          )
  
      if not isinstance(src_trans_dst, Tensor):
          raise TypeError(
              f"Input src_trans_dst type is not a Tensor. Got {type(src_trans_dst)}."
          )
  
      if not (
          len(src_trans_dst.shape) == 3
          and src_trans_dst.shape[-2:] == (4, 4)
      ):
          raise ValueError(
              f"Input src_trans_dst must have a shape (B, 4, 4). Got: {src_trans_dst.shape}."
          )
  
      if not isinstance(camera_matrix, Tensor):
          raise TypeError(
              f"Input camera_matrix type is not a Tensor. Got {type(camera_matrix)}."
          )
  
      if not (
          len(camera_matrix.shape) == 3
          and camera_matrix.shape[-2:] == (3, 3)
      ):
          raise ValueError(
              f"Input camera_matrix must have a shape (B, 3, 3). Got: {camera_matrix.shape}."
          )
  
      # unproject source points to camera frame
      points_3d_dst: Tensor = depth_to_3d(
          depth_dst, camera_matrix, normalize_points
      )  # Bx3xHxW
  
      # transform points from source to destination
      points_3d_dst = points_3d_dst.permute(0, 2, 3, 1)  # BxHxWx3
  
      # apply transformation to the 3d points
      points_3d_src = transform_points(
          src_trans_dst[:, None], points_3d_dst
      )  # BxHxWx3
  
      # project back to pixels
      camera_matrix_tmp: Tensor = camera_matrix[
          :, None, None
      ]  # Bx1x1xHxW
      points_2d_src: Tensor = project_points(
          points_3d_src, camera_matrix_tmp
      )  # BxHxWx2
  
      # normalize points between [-1 / 1]
      height, width = depth_dst.shape[-2:]
      points_2d_src_norm: Tensor = normalize_pixel_coordinates(
          points_2d_src, height, width
      )  # BxHxWx2
  
      return kornia_ops.map_coordinates(
          image_src, points_2d_src_norm, align_corners=True
      )
  
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 5 for calling a global function with example usage: warp_frame_depth(image_src, depth_dst, src_trans_dst, camera_matrix, normalize_points) and returns: kornia_ops