code: def get_camera_for_plot(pose):
      if (
          pose.shape[1] == 7
      ):  # In case of quaternion vector representation
          cam_loc = pose[:, 4:].detach()
          R = quat_to_rot(pose[:, :4].detach())
      else:  # In case of pose matrix representation
          cam_loc = pose[:, :3, 3]
          R = pose[:, :3, :3]
      cam_dir = R[:, :3, 2]
      return cam_loc, cam_dir
  
file_path: insightface/reconstruction/PBIDR/code/utils/rend_util.py
imports: import numpy
  import imageio
  import skimage
  import cv2
  import torch
  from torch.nn import functional
label_desc: Use image node_id 6 for calling a global function with example usage: get_camera_for_plot(pose) and returns: cam_loc,  cam_dir