code: def pixel2cam(
      depth: Tensor, intrinsics_inv: Tensor, pixel_coords: Tensor
  ) -> Tensor:
      r"""Transform coordinates in the pixel frame to the camera frame.
  
      Args:
          depth: the source depth maps. Shape must be Bx1xHxW.
          intrinsics_inv: the inverse intrinsics camera matrix. Shape must be Bx4x4.
          pixel_coords: the grid with (u, v, 1) pixel coordinates. Shape must be BxHxWx3.
  
      Returns:
          tensor of shape BxHxWx3 with (x, y, z) cam coordinates.
      """
      if not len(depth.shape) == 4 and depth.shape[1] == 1:
          raise ValueError(
              f"Input depth has to be in the shape of Bx1xHxW. Got {depth.shape}"
          )
      if not len(intrinsics_inv.shape) == 3:
          raise ValueError(
              f"Input intrinsics_inv has to be in the shape of Bx4x4. Got {intrinsics_inv.shape}"
          )
      if (
          not len(pixel_coords.shape) == 4
          and pixel_coords.shape[3] == 3
      ):
          raise ValueError(
              f"Input pixel_coords has to be in the shape of BxHxWx3. Got {intrinsics_inv.shape}"
          )
      cam_coords: Tensor = transform_points(
          intrinsics_inv[:, None], pixel_coords
      )
      return cam_coords * depth.permute(0, 2, 3, 1)
  
imports: from typing import Iterable, List, Union
  import torch
  from kornia.core import Device, Tensor, eye, stack, zeros
  from kornia.core.check import KORNIA_CHECK_SAME_DEVICE
  from kornia.geometry.conversions import convert_points_from_homogeneous, convert_points_to_homogeneous
  from kornia.geometry.linalg import inverse_transformation, transform_points
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 6 for calling a global function with example usage: pixel2cam(depth, intrinsics_inv, pixel_coords) and returns: unknown