code: def calc_ray_t_vals(points_3d: Tensor) -> Tensor:
      r"""Calculates t values along rays.
  
      Args:
          points_3d: Points along rays :math:`(*, num_ray_points, 3)`
  
      Returns:
          t values along rays :math:`(*, num_ray_points)`
      """
      t_vals = torch.linalg.norm(
          points_3d - points_3d[..., 0, :].unsqueeze(-2), dim=-1
      )
      return t_vals
  
imports: import math
  from typing import Dict, List, Tuple
  import torch
  from kornia.core import Device, Tensor, tensor
  from kornia.geometry.camera import PinholeCamera
  from kornia.nerf.camera_utils import cameras_for_ids
  from kornia.utils._compat import torch_meshgrid
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 3 for calling a global function with example usage: calc_ray_t_vals(points_3d) and returns: t_vals