code: def test_basics():
      g = rand_graph(10, 20, device=F.cpu())
      x = torch.ones(g.num_nodes(), 10)
      result = OPS.copy_u_sum(g, x).to(F.ctx())
  
      # launch on default stream used in DGL
      xx = x.to(device=F.ctx())
      gg = g.to(device=F.ctx())
      OPS.copy_u_sum(gg, xx)
      assert torch.equal(OPS.copy_u_sum(gg, xx), result)
  
      # launch on new stream created via torch.cuda
      s = torch.cuda.Stream(device=F.ctx())
      with torch.cuda.stream(s):
          xx = x.to(device=F.ctx(), non_blocking=True)
          gg = g.to(device=F.ctx())
          OPS.copy_u_sum(gg, xx)
      s.synchronize()
      assert torch.equal(OPS.copy_u_sum(gg, xx), result)
  
file_path: dgl/tests/python/pytorch/test_ffi-stream.py
imports: import unittest
  from statistics import mean
  import backend
  import dgl
  import dgl.ndarray
  import dgl.ops
  import numpy
  import torch
  from dgl import rand_graph
  from dgl._ffi.streams import _dgl_get_stream, to_dgl_stream_handle
  from dgl.utils import to_dgl_context
label_desc: Use image node_id 2 for calling a global function with example usage: test_basics() without return types