code: def cuda(x):
      if torch.cuda.is_available() and not os.getenv("NOCUDA", None):
          return x.to(
              torch.device("cuda")
          )  # works for both DGLGraph and tensor
      else:
          return x
  
file_path: dgl/examples/pytorch/jtnn/jtnn/nnutils.py
imports: import os
  import dgl
  import torch
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: cuda(x) and returns: x, x