code: def get_device_of(tensor):
      """
      Returns the device of the tensor.
      """
      if not tensor.is_cuda:
          return -1
      else:
          return tensor.get_device()
  
imports: from __future__ import division
  from __future__ import absolute_import
  from collections import defaultdict
  import logging
  import math
  import torch
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 25 for calling a global function with example usage: get_device_of(tensor) and returns: unknown, tensor