code: def is_gpu_device(device):
      return (
          isinstance(device, int)
          or (isinstance(device, str) and "cuda" in device)
          or (
              isinstance(device, torch.device) and device.type == "cuda"
          )
      )
  
imports: import os
  import torch
  from logging import warning
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_10
label_desc: Use image node_id 4 for calling a global function with example usage: is_gpu_device(device) and returns: unknown