code: def to_device(batch, device):
      output = {}
      for k, v in batch.items():
          try:
              output[k] = v.to(device)
          except:
              output[k] = v
      return output
  
imports: import os
  import torch
  import random
  import numpy
  from transformers import set_seed, AutoTokenizer
  import json
  import deepspeed
  from deepspeed.runtime.zero.partition_parameters import ZeroParamStatus
  from deepspeed.accelerator import get_accelerator
  import torch.nn
label_desc: Use image node_id 3 for calling a global function with example usage: to_device(batch, device) and returns: output