code: def get_matches(feat_source, feat_target, sym=False):
      matches = knn(feat_target, feat_source, k=1).T
      if sym:
          match_inv = knn(feat_source, feat_target, k=1).T
          mask = match_inv[matches[:, 1], 1] == torch.arange(
              matches.shape[0], device=feat_source.device
          )
          return matches[mask]
      else:
          return matches
  
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 1 for calling a global function with example usage: get_matches(feat_source, feat_target, sym) and returns: matches, matches