code: def fast_global_registration(xyz, xyz_target, mu_init=1, num_iter=20):
      """
      estimate the rotation and translation using Fast Global Registration algorithm (M estimator for robust estimation)
      http://vladlen.info/papers/fast-global-registration.pdf
      """
      assert xyz.shape == xyz_target.shape
  
      T_res = torch.eye(4, device=xyz.device)
      mu = mu_init
      source = xyz.clone()
      weight = torch.ones(len(source), 1, device=xyz.device)
      for i in range(num_iter):
          if i > 0 and i % 5 == 0:
              mu /= 2.0
          A, b = get_matrix_system(source, xyz_target, weight)
          x = torch.linalg.solve(A.T.mm(A), A.T @ b)
          T = get_trans(x.view(-1))
          source = source.mm(T[:3, :3].T) + T[:3, 3]
          T_res = T @ T_res
          weight = get_geman_mclure_weight(source, xyz_target, mu)
      return T_res
  
file_path: torch-points3d/torch_points3d/utils/registration.py
imports: import open3d
  import numpy
  import torch
  from torch_points3d.utils.geometry import get_trans
  from torch_geometric.nn import knn
label_desc: Use image node_id 5 for calling a global function with example usage: fast_global_registration(xyz, xyz_target, mu_init, num_iter) and returns: T_res