docstr: Applies the function :obj:`func` to all tensor and Data attributes
  :obj:`*keys`. If :obj:`*keys` is not given, :obj:`func` is applied to
  all present attributes.
docstr_tok: ["Applies","the","function",":","obj",":","`","func","`","to","all","tensor","and","Data","attributes",":","obj",":","`","*","keys","`",".","If",":","obj",":","`","*","keys","`","is","not","given",",",":","obj",":","`","func","`","is","applied","to","all","present","attributes","."]
code: def apply(self, func, *keys):
      r"""Applies the function :obj:`func` to all tensor and Data attributes
      :obj:`*keys`. If :obj:`*keys` is not given, :obj:`func` is applied to
      all present attributes.
      """
      for key, item in self(*keys):
          if torch.is_tensor(item):
              self[key] = func(item)
      for scale in range(self.num_scales):
          self.multiscale[scale] = self.multiscale[scale].apply(func)
          self.multiscale_target[scale] = self.multiscale_target[
              scale
          ].apply(func)
  
      for up in range(self.num_upsample):
          self.upsample[up] = self.upsample[up].apply(func)
          self.upsample_target[up] = self.upsample_target[up].apply(
              func
          )
      return self
  
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 2 for calling the MultiScalePair obj's underlying member method code with example usage: obj.apply(func) and returns: self