code: def to_cuda(x, device=None):
      if device:
          x = x.to(device)
  
      return x
  
imports: import os
  import pickle
  from collections import OrderedDict
  import numpy
  import torch
  import torch.nn
  import yaml
  from scipy import sparse
  from sklearn import preprocessing
  from graph4nlp.pytorch.data.data import GraphData
label_desc: Use image node_id 4 for calling a global function with example usage: to_cuda(x, device) and returns: x