code: def fps_sampling(pair_ind, pos, num_pos_pairs, ind=0):
      """
      perform fps sampling to choose the positive pairs
      Parameters:
          pair_ind: torch tensor which represents index of pair size N x 2
          pos: torch tensor which represents the point cloud of size M x 3
          num_pos_pairs: int which number of pairs we want()
          ind: must be 0 or 1
      """
      small_pos_source = pos[pair_ind[:, ind]]
      batch = torch.zeros(small_pos_source.shape[0]).long()
      ratio = float(num_pos_pairs) / len(pair_ind)
      if ratio <= 0 or ratio >= 1:
          raise ValueError(
              "ratio cannot have this value: {}".format(ratio)
          )
      index = fps(
          small_pos_source, batch, ratio=ratio, random_start=False
      )
      return index
  
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 14 for calling a global function with example usage: fps_sampling(pair_ind, pos, num_pos_pairs, ind) and returns: index