code: def to_cuda(data):
      """
      Move an object to CUDA.
  
      This function works recursively on lists and dicts, moving the values
      inside to cuda.
  
      Args:
          data (list, tuple, dict, torch.Tensor, torch.nn.Module):
              The data you'd like to move to the GPU. If there's a pytorch tensor or
              model in data (e.g. in a list or as values in a dictionary) this
              function will move them all to CUDA and return something that matches
              the input in structure.
  
      Returns:
          list, tuple, dict, torch.Tensor, torch.nn.Module:
              Data of the same type / structure as the input.
      """
      # the base case: if this is not a type we recognise, return it
      return data
  
imports: from collections.abc import Mapping, Sequence
  from functools import singledispatch
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: to_cuda(data) and returns: data