code: def homography_warp3d(
      patch_src: Tensor,
      src_homo_dst: Tensor,
      dsize: tuple[int, int, int],
      mode: str = "bilinear",
      padding_mode: str = "zeros",
      align_corners: bool = False,
      normalized_coordinates: bool = True,
  ) -> Tensor:
      r"""Warp image patches or tensors by normalized 3D homographies.
  
      Args:
          patch_src: The image or tensor to warp. Should be from source of shape :math:`(N, C, D, H, W)`.
          src_homo_dst: The homography or stack of homographies from destination to source of shape
            :math:`(N, 4, 4)`.
          dsize: The height and width of the image to warp.
          mode: interpolation mode to calculate output values ``'bilinear'`` | ``'nearest'``.
          padding_mode: padding mode for outside grid values ``'zeros'`` | ``'border'`` | ``'reflection'``.
          align_corners: interpolation flag.
          normalized_coordinates: Whether the homography assumes [-1, 1] normalized coordinates or not.
  
      Return:
          Patch sampled at locations from source to destination.
  
      Example:
          >>> input = torch.rand(1, 3, 32, 32)
          >>> homography = torch.eye(3).view(1, 3, 3)
          >>> output = homography_warp(input, homography, (32, 32))
      """
      if not src_homo_dst.device == patch_src.device:
          raise TypeError(
              f"Patch and homography must be on the same device. Got patch.device: {patch_src.device} "
              f"src_H_dst.device: {src_homo_dst.device}."
          )
  
      depth, height, width = dsize
      grid = create_meshgrid3d(
          depth,
          height,
          width,
          normalized_coordinates=normalized_coordinates,
          device=patch_src.device,
      )
      warped_grid = warp_grid3d(grid, src_homo_dst)
  
      return F.grid_sample(
          patch_src,
          warped_grid,
          mode=mode,
          padding_mode=padding_mode,
          align_corners=align_corners,
      )
  
imports: from __future__ import annotations
  from typing import Optional
  import torch
  import torch.nn.functional
  from kornia.core import Tensor, concatenate, ones, ones_like, stack, tan, tensor, zeros
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_SHAPE
  from kornia.geometry.conversions import angle_to_rotation_matrix, axis_angle_to_rotation_matrix, convert_affinematrix_to_homography, convert_affinematrix_to_homography3d, deg2rad, normalize_homography, normalize_homography3d, normalize_pixel_coordinates
  from kornia.geometry.linalg import transform_points
  from kornia.utils import create_meshgrid, create_meshgrid3d, eye_like
  from kornia.utils.helpers import _torch_inverse_cast, _torch_solve_cast
label_desc: Use image node_id 24 for calling a global function with example usage: homography_warp3d(patch_src, src_homo_dst, dsize, mode, padding_mode, align_corners, normalized_coordinates) and returns: F