code: def get_patch_online(self, idx):
      p_extractor = PatchExtractor(self.radius_patch)
  
      match = np.load(
          osp.join(self.path_data, "matches{:06d}.npy".format(idx)),
          allow_pickle=True,
      ).item()
      data_source = torch.load(match["path_source"]).to(torch.float)
      data_target = torch.load(match["path_target"]).to(torch.float)
  
      # select a random match on the list of match.
      # It cannot be 0 because matches are filtered.
      rand = np.random.randint(0, len(match["pair"]))
  
      data_source = p_extractor(data_source, match["pair"][rand][0])
      data_target = p_extractor(data_target, match["pair"][rand][1])
  
      if self.transform is not None:
          data_source = self.transform(data_source)
          data_target = self.transform(data_target)
      batch = Pair.make_pair(data_source, data_target)
      batch = batch.contiguous()
      return batch
  
imports: import numpy
  import os
  import os.path
  import torch
  from torch_geometric.data import Data
  from torch_points3d.datasets.registration.base3dmatch import Base3DMatch
  from torch_points3d.datasets.registration.utils import PatchExtractor
  from torch_points3d.datasets.registration.utils import tracked_matches
  from torch_points3d.datasets.registration.pair import Pair, MultiScalePair
  from torch_points3d.metrics.registration_tracker import PatchRegistrationTracker
  from torch_points3d.metrics.registration_tracker import FragmentRegistrationTracker
  from torch_points3d.datasets.registration.base_siamese_dataset import BaseSiameseDataset
  from torch_points3d.datasets.registration.base_siamese_dataset import GeneralFragment
  from torch_points3d.datasets.registration.utils import compute_overlap_and_matches
  from torch_points3d.datasets.registration.test3dmatch import TestPair3DMatch
label_desc: Use image node_id 2 for calling the Patch3DMatch obj's underlying member method code with example usage: obj.get_patch_online(idx) and returns: batch