class_docstr: Performs tensor device conversion, either for all attributes of the
  :obj:`~torch_geometric.data.Data` object or only the ones given by
  :obj:`attrs` (functional name: :obj:`to_device`).
  
  Args:
      device (torch.device): The destination device.
      attrs (List[str], optional): If given, will only perform tensor device
          conversion for the given attributes. (default: :obj:`None`)
      non_blocking (bool, optional): If set to :obj:`True` and tensor
          values are in pinned memory, the copy will be asynchronous with
          respect to the host. (default: :obj:`False`)
code: def __init__(
      self,
      device: Union[int, str],
      attrs: Optional[List[str]] = None,
      non_blocking: bool = False,
  ) -> None:
      self.device = device
      self.attrs = attrs or []
      self.non_blocking = non_blocking
  
file_path: pytorch_geometric/torch_geometric/transforms/to_device.py
imports: from typing import List, Optional, Union
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
label_desc: Use image node_id 1 to create a new ToDevice object from inherited base classes: BaseTransform with example: obj = ToDevice(device, attrs, non_blocking)