code: def device_decorator(device, func):
      return context_decorator(lambda: device, func)
  
file_path: pytorch/torch/utils/_device.py
imports: import torch
  from torch.overrides import TorchFunctionMode
  from torch.utils._contextlib import context_decorator
  import functools
label_desc: Use image node_id 2 for calling a global function with example usage: device_decorator(device, func) and returns: context_decorator