code: def to_dgl_stream_handle(cuda_stream):
      """Convert torch.cuda.Stream to DGL stream handle
  
      Parameters
      ----------
      cuda_stream : torch.cuda.Stream.
  
      Returns
      -------
      DGLStreamHandle
          DGLStreamHandle of the input ``cuda_stream``.
      """
      return ctypes.c_void_p(cuda_stream.cuda_stream)
  
imports: from __future__ import absolute_import
  import ctypes
  from .base import _FFI_MODE, _LIB, check_call
  from .runtime_ctypes import DGLStreamHandle
label_desc: Use image node_id 1 for calling a global function with example usage: to_dgl_stream_handle(cuda_stream) and returns: ctypes