code: def filter_pair(pair, dist):
      """
      give a pair of indices where the distance is positive
      """
      pair = pair[dist[:, 0] >= 0]
      if len(pair) > 0:
          pair = pair.numpy()[:, ::-1]
      else:
          pair = np.array([])
      return pair
  
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 8 for calling a global function with example usage: filter_pair(pair, dist) and returns: pair