code: def concatenate_pair_ind(list_data_source, list_data_target):
      """
      for a list of pair of indices batched, change the index it refers to wrt the batch index
      Parameters
      ----------
      list_data_source: list[Data]
      list_data_target: list[Data]
      Returns
      -------
      torch.Tensor
          indices of y corrected wrt batch indices
  
  
      """
  
      assert len(list_data_source) == len(list_data_target)
      assert hasattr(list_data_source[0], "pair_ind")
      list_pair_ind = []
      cum_size = torch.zeros(2)
      for i in range(len(list_data_source)):
          size = torch.tensor(
              [
                  len(list_data_source[i].pos),
                  len(list_data_target[i].pos),
              ]
          )
          list_pair_ind.append(list_data_source[i].pair_ind + cum_size)
          cum_size = cum_size + size
      return torch.cat(list_pair_ind, 0)
  
imports: import torch
  from typing import List, Optional
  from torch_geometric.data import Data
  from torch_geometric.data import Batch
  from torch_points3d.datasets.multiscale_data import MultiScaleBatch, MultiScaleData
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: concatenate_pair_ind(list_data_source, list_data_target) and returns: torch