code: def set_torch_num_threads(num_cpus):
      """Set torch number of threads and recover it upon exist"""
      import torch
  
      original_num_threads = torch.get_num_threads()
      torch.set_num_threads(num_cpus)
      yield
      torch.set_num_threads(original_num_threads)
  
label_desc: Use image node_id 1 for calling a global function with example usage: set_torch_num_threads(num_cpus) without return types