class_docstr_tok: []
code: def test_pair_batch(self):
      d1 = Data(x=torch.tensor([1]), pos=torch.tensor([1]))
      d2 = Data(x=torch.tensor([2]), pos=torch.tensor([4]))
      d3 = Data(x=torch.tensor([3]), pos=torch.tensor([9]))
      d4 = Data(x=torch.tensor([4]), pos=torch.tensor([16]))
      p1 = Pair.make_pair(d1, d2)
      p2 = Pair.make_pair(d3, d4)
      batch = PairBatch.from_data_list([p1, p2])
      tt.assert_allclose(batch.x, torch.tensor([1, 3]))
      tt.assert_allclose(batch.pos, torch.tensor([1, 9]))
      tt.assert_allclose(batch.batch, torch.tensor([0, 1]))
      tt.assert_allclose(batch.x_target, torch.tensor([2, 4]))
      tt.assert_allclose(batch.pos_target, torch.tensor([4, 16]))
      tt.assert_allclose(batch.batch_target, torch.tensor([0, 1]))
  
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 2 for calling the TestMSPair obj's underlying member method code with example usage: obj.test_pair_batch() without return types