code: def test_CopyTo():
      item_sampler = gb.ItemSampler(gb.ItemSet(torch.randn(20)), 4)
  
      # Invoke CopyTo via class constructor.
      dp = gb.CopyTo(item_sampler, "cuda")
      for data in dp:
          assert data.device.type == "cuda"
  
      # Invoke CopyTo via functional form.
      dp = item_sampler.copy_to("cuda")
      for data in dp:
          assert data.device.type == "cuda"
  
file_path: dgl/tests/python/pytorch/graphbolt/test_base.py
imports: import re
  import unittest
  from collections.abc import Iterable, Mapping
  import backend
  import dgl.graphbolt
  import pytest
  import torch
  from .None import gb_test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_CopyTo() without return types