code: def tracked_matches(data_s, data_t, pair):
      """
      allow to keep the index that are still present after a sparse input
      Parameters:
      pair : P x 2 indices of the matched points before any transformation
      """
  
      pair_np = pair.numpy()
      mask_s = np.isin(pair_np[:, 0], data_s.origin_id.numpy())
      mask_t = np.isin(pair_np[:, 1], data_t.origin_id.numpy())
      # print(data_s.origin_id.shape)
      # print(data_s.pos.shape)
      # print(data_s.xyz.shape)
      mask = np.logical_and(mask_s, mask_t)
      filtered_pair = pair_np[mask]
  
      table_s = dict(
          zip(data_s.origin_id.numpy(), np.arange(0, len(data_s.pos)))
      )
      table_t = dict(
          zip(data_t.origin_id.numpy(), np.arange(0, len(data_t.pos)))
      )
      res = torch.tensor(
          [[table_s[p[0]], table_t[p[1]]] for p in filtered_pair]
      ).to(torch.long)
      return res
  
imports: import collections
  import errno
  import numpy
  import os
  import os.path
  import torch
  from torch_geometric.data import Data
  from torch_points_kernels.points_cpu import ball_query
  import imageio
  from tqdm.auto import tqdm
  from torch_points3d.core.data_transform import GridSampling3D, SaveOriginalPosId
  from torch_geometric.transforms import Compose
  import torch_points3d.datasets.registration.fusion
  from torch_cluster import fps
label_desc: Use image node_id 13 for calling a global function with example usage: tracked_matches(data_s, data_t, pair) and returns: res