code: def compute_look_at_vectors(
      centers: torch.Tensor,
      jitter_up: Optional[float] = None,
      device: torch.device = "cuda",
  ):
      """
      Compute the look-at vectors for camera poses.
  
      Parameters:
          centers: The centers of the cameras.
          jitter_up: The noise range for the up vector of the camera.
          device: Device to allocate the output tensor.
  
      Returns:
          Tuple: Contains the following:
              - forward_vector: The forward vectors of the cameras, shape [B, 3].
              - up_vector: The up vectors of the cameras, shape [B, 3].
              - right_vector: The right vectors of the cameras, shape [B, 3].
      """
      forward_vector = F.normalize(centers)
      up_vector = (
          torch.FloatTensor([0, 1, 0])
          .to(device)
          .unsqueeze(0)
          .repeat(len(centers), 1)
      )
      right_vector = F.normalize(
          torch.cross(forward_vector, up_vector, dim=-1)
      )
      up_noise = (
          torch.randn_like(up_vector) * jitter_up
          if jitter_up is not None
          else 0
      )
      up_vector = F.normalize(
          torch.cross(right_vector, forward_vector, dim=-1) + up_noise
      )
  
      return forward_vector, up_vector, right_vector
  
file_path: NeMo/nemo/collections/multimodal/data/nerf/utils.py
imports: from typing import Dict, Optional
  import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 2 for calling a global function with example usage: compute_look_at_vectors(centers, jitter_up, device) and returns: forward_vector,  up_vector,  right_vector