code: def compute_hit_ratio(xyz, xyz_target, T_gt, tau_1):
      """
      compute proportion of point which are close.
      """
      assert xyz.shape == xyz.shape
      dist = torch.norm(
          xyz.mm(T_gt[:3, :3].T) + T_gt[:3, 3] - xyz_target, dim=1
      )
  
      return torch.mean((dist < tau_1).to(torch.float))
  
imports: import torch
  import numpy
  from sklearn.neighbors import NearestNeighbors
label_desc: Use image node_id 2 for calling a global function with example usage: compute_hit_ratio(xyz, xyz_target, T_gt, tau_1) and returns: torch