code: def create_var(tensor, requires_grad=None):
      if requires_grad is None:
          return Variable(tensor).cuda()
      else:
          return Variable(tensor, requires_grad=requires_grad).cuda()
  
file_path: DIG/dig/ggraph/method/JTVAE/fast_jtnn/nnutils.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.autograd import Variable
label_desc: Use image node_id 1 for calling a global function with example usage: create_var(tensor, requires_grad) and returns: Variable, Variable