code: def compute_subsampled_matches(
      data1, data2, voxel_size=0.1, max_distance_overlap=0.02
  ):
      """
      compute matches on subsampled version of data and track ind
      """
      grid_sampling = Compose(
          [SaveOriginalPosId(), GridSampling3D(voxel_size, mode="last")]
      )
      subsampled_data = grid_sampling(data1.clone())
      origin_id = subsampled_data.origin_id.numpy()
      pair = compute_overlap_and_matches(
          subsampled_data, data2, max_distance_overlap
      )["pair"]
      pair[:, 0] = origin_id[pair[:, 0]]
      return torch.from_numpy(pair.copy())
  
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 10 for calling a global function with example usage: compute_subsampled_matches(data1, data2, voxel_size, max_distance_overlap) and returns: torch