code: def to_device(data, device):
      """Transfer the tensor or dictionary of tensors to the given device.
  
      Nothing will happen if the device of the original tensor is the same as target device.
  
      Parameters
      ----------
      data : Tensor or dict[str, Tensor]
          The data.
      device : device
          The target device.
  
      Returns
      -------
      Tensor or dict[str, Tensor]
          The output data.
      """
      if isinstance(data, dict):
          return {k: F.copy_to(v, device) for k, v in data.items()}
      else:
          return F.copy_to(data, device)
  
file_path: dgl/python/dgl/utils/data.py
imports: from collections import namedtuple
  import networkx
  import scipy
  from ..None import backend
  from ..base import DGLError
  from .None import checks
label_desc: Use image node_id 7 for calling a global function with example usage: to_device(data, device) and returns: unknown, F