code: def get_cuda_device_string():
      if shared.cmd_opts.device_id is not None:
          return f"cuda:{shared.cmd_opts.device_id}"
  
      return "cuda"
  
imports: import sys
  import contextlib
  from functools import lru_cache
  import torch
  from modules import errors, shared
label_desc: Use image node_id 3 for calling a global function with example usage: get_cuda_device_string() and returns: str, str, shared