code: def compute_transfo_error(T_gt, T_pred):
      """
      compute the translation error (the unit depends on the unit of the point cloud)
      and compute the rotation error in degree using the formula (norm of antisymetr):
      http://jlyang.org/tpami16_go-icp_preprint.pdf
      """
      rte = torch.norm(T_gt[:3, 3] - T_pred[:3, 3])
      cos_theta = (
          torch.trace(T_gt[:3, :3].mm(T_pred[:3, :3].T)) - 1
      ) * 0.5
      cos_theta = torch.clamp(cos_theta, -1.0, 1.0)
      rre = torch.acos(cos_theta) * 180 / np.pi
      return rte, rre
  
imports: import torch
  import numpy
  from sklearn.neighbors import NearestNeighbors
label_desc: Use image node_id 3 for calling a global function with example usage: compute_transfo_error(T_gt, T_pred) and returns: rte,  rre