code: def to_device(obj, device):
      """
      Move a tensor, tuple, list, or dict onto device.
      """
      if torch.is_tensor(obj):
          return obj.to(device)
      if isinstance(obj, tuple):
          return tuple(to_device(t, device) for t in obj)
      if isinstance(obj, list):
          return [to_device(t, device) for t in obj]
      if isinstance(obj, dict):
          return {k: to_device(v, device) for k, v in obj.items()}
      if isinstance(obj, (int, float, str)):
          return obj
      raise ValueError(
          "'%s' has unsupported type '%s'" % (obj, type(obj))
      )
  
imports: import logging
  from collections import OrderedDict
  import time
  import numpy
  import torch
  import nni.retiarii.nn.pytorch
  from nni.nas.pytorch.mutables import Mutable, InputChoice, LayerChoice
label_desc: Use image node_id 5 for calling a global function with example usage: to_device(obj, device) and returns: obj, tuple, unknown, unknown, obj