class_docstr_tok: []
code: def test_ms_pair_ind(self):
      x = torch.randn(1001, 3)
      pos = x
      x_target = torch.randn(1452, 3)
      pos_target = x_target
      ms = [Data(x=x, pos=pos), Data(x=4 * x, pos=4 * pos)]
      ms_target = [
          Data(x=x_target, pos=pos_target),
          Data(x=4 * x_target, pos=4 * pos_target),
      ]
      data1 = MultiScalePair(
          x=x,
          pos=pos,
          multiscale=ms,
          x_target=x_target,
          pos_target=pos_target,
          multiscale_target=ms_target,
      )
      data1.pair_ind = torch.tensor(
          [[0, 1], [99, 36], [98, 113], [54, 29], [10, 110], [1, 0]]
      )
      x = torch.randn(300, 3)
      pos = x
      x_target = torch.randn(154, 3)
      pos_target = x_target
      ms = [Data(x=x, pos=pos), Data(x=4 * x, pos=4 * pos)]
      ms_target = [
          Data(x=x_target, pos=pos_target),
          Data(x=4 * x_target, pos=4 * pos_target),
      ]
      data2 = MultiScalePair(
          x=x,
          pos=pos,
          multiscale=ms,
          x_target=x_target,
          pos_target=pos_target,
          multiscale_target=ms_target,
      )
      data2.pair_ind = torch.tensor([[0, 1], [100, 1000], [1, 0]])
  
      batch = PairMultiScaleBatch.from_data_list([data1, data2])
  
      expected_pair_ind = torch.tensor(
          [
              [0, 1],
              [99, 36],
              [98, 113],
              [54, 29],
              [10, 110],
              [1, 0],
              [0 + 1001, 1 + 1452],
              [100 + 1001, 1000 + 1452],
              [1 + 1001, 0 + 1452],
          ]
      )
  
      npt.assert_almost_equal(
          batch.pair_ind.numpy(), expected_pair_ind.numpy()
      )
  
file_path: torch-points3d/test/test_msdatapair.py
imports: import unittest
  import torch
  import torch.testing
  from torch_geometric.data import Data
  import numpy.testing
  from torch_points3d.datasets.registration.pair import Pair, MultiScalePair, PairBatch, PairMultiScaleBatch
label_desc: Use image node_id 5 for calling the TestMSPair obj's underlying member method code with example usage: obj.test_ms_pair_ind() without return types