code: def geometry_guided_near_far_np(
      orig, dir, vert, geo_threshold=DEFAULT_GEO_THRESH
  ):
      num_vert = vert.shape[0]
      num_rays = orig.shape[0]
      orig_ = np.repeat(orig[:, None, :], num_vert, 1)
      dir_ = np.repeat(dir[:, None, :], num_vert, 1)
      vert_ = np.repeat(vert[None, ...], num_rays, 0)
      orig_v = vert_ - orig_
      z0 = np.einsum(
          "ij,ij->i", orig_v.reshape(-1, 3), dir_.reshape(-1, 3)
      ).reshape(num_rays, num_vert)
      dz = np.sqrt(
          geo_threshold**2
          - (np.linalg.norm(orig_v, axis=2) ** 2 - z0**2)
      )
      near = np.nan_to_num(z0 - dz, nan=np.inf).min(axis=1)
      far = np.nan_to_num(z0 + dz, nan=-np.inf).max(axis=1)
      return near, far
  
file_path: ml-neuman/utils/ray_utils.py
imports: import numpy
  import torch
  import igl
  from geometry.pcd_projector import PointCloudProjectorNp
  from utils.constant import DEFAULT_GEO_THRESH, PERTURB_EPSILON
label_desc: Use image node_id 12 for calling a global function with example usage: geometry_guided_near_far_np(orig, dir, vert, geo_threshold) and returns: near,  far