code: def tensors_to_device(data, device):
      if data is None:
          return None
      elif isinstance(data, torch.Tensor):
          return data.to(device)
      elif isinstance(data, dict):
          return {
              k: tensors_to_device(v, device) for k, v in data.items()
          }
      else:
          raise ValueError(f"Unsupported type: {type(data)}")
  
file_path: summarize-from-feedback/summarize_from_feedback/utils/torch_utils.py
imports: import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 2 for calling a global function with example usage: tensors_to_device(data, device) and returns: None, data, unknown