code: def get_device_of(tensor: torch.Tensor) -> int:
      """
      Returns the device of the tensor.
      """
      if not tensor.is_cuda:
          return -1
      else:
          return tensor.get_device()
  
imports: from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, Union
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: get_device_of(tensor) and returns: unknown, tensor