docstr: Unpack input data from the dataloader and perform necessary pre-processing steps.
  Parameters:
      input: a dictionary that contains the data itself and its metadata information.
code: def set_input(self, data, device):
      """Unpack input data from the dataloader and perform necessary pre-processing steps.
      Parameters:
          input: a dictionary that contains the data itself and its metadata information.
      """
      # data = data.to(device)
      if isinstance(data, PairMultiScaleBatch):
          self.pre_computed = [f.to(device) for f in data.multiscale]
          self.upsample = [f.to(device) for f in data.upsample]
      else:
          self.upsample = None
          self.pre_computed = None
  
      self.input = Data(pos=data.pos, x=data.x, batch=data.batch).to(
          device
      )
      if hasattr(data, "pos_target"):
          if isinstance(data, PairMultiScaleBatch):
              self.pre_computed_target = [
                  f.to(device) for f in data.multiscale_target
              ]
              self.upsample_target = [
                  f.to(device) for f in data.upsample_target
              ]
          else:
              self.upsample_target = None
              self.pre_computed_target = None
          self.input_target = Data(
              pos=data.pos_target,
              x=data.x_target,
              batch=data.batch_target,
          ).to(device)
          self.match = data.pair_ind.to(torch.long).to(device)
          self.size_match = data.size_pair_ind.to(torch.long).to(device)
      else:
          self.match = None
  
imports: from typing import Any
  import torch
  import torch.nn.functional
  from torch.nn import Linear
  from torch.nn import Sequential
  from torch_geometric.data import Data
  from torch_geometric.nn import global_mean_pool
  import logging
  from torch_points3d.core.losses import *
  from torch_points3d.core.common_modules import MLP
  from torch_points3d.core.common_modules import FastBatchNorm1d
  from torch_points3d.core.base_conv.partial_dense import *
  from torch_points3d.models.registration.base import FragmentBaseModel
  from torch_points3d.models.base_architectures import BackboneBasedModel
  from torch_points3d.models.registration.base import create_batch_siamese
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.models.base_architectures.unet import UnwrappedUnetBasedModel
  from torch_points3d.modules.KPConv import *
  from torch_points3d.datasets.registration.pair import PairMultiScaleBatch
label_desc: Use image node_id 2 for calling the FragmentKPConv obj's underlying member method code with example usage: obj.set_input(data, device) without return types