class_docstr_tok: []
code: def test_apply(self):
      x = torch.tensor([1])
      pos = torch.tensor([1])
      x_target = torch.tensor([2])
      pos_target = torch.tensor([2])
  
      ms = [Data(x=2 * x, pos=2 * pos), Data(x=3 * x, pos=3 * pos)]
      ms_target = [
          Data(x=2 * x_target, pos=2 * pos_target),
          Data(x=3 * x_target, pos=3 * pos_target),
      ]
      data = MultiScalePair(
          x=x,
          pos=pos,
          multiscale=ms,
          x_target=x_target,
          pos_target=pos_target,
          multiscale_target=ms_target,
      )
      data.apply(lambda x: 2 * x)
      self.assertEqual(data.x[0], 2)
      self.assertEqual(data.pos[0], 2)
      self.assertEqual(data.multiscale[0].pos[0], 4)
      self.assertEqual(data.multiscale[0].x[0], 4)
      self.assertEqual(data.multiscale[1].pos[0], 6)
      self.assertEqual(data.multiscale[1].x[0], 6)
  
      self.assertEqual(data.x_target[0], 4)
      self.assertEqual(data.pos_target[0], 4)
      self.assertEqual(data.multiscale_target[0].pos[0], 8)
      self.assertEqual(data.multiscale_target[0].x[0], 8)
      self.assertEqual(data.multiscale_target[1].pos[0], 12)
      self.assertEqual(data.multiscale_target[1].x[0], 12)
  
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 1 for calling the TestMSPair obj's underlying member method code with example usage: obj.test_apply() without return types