code: def _to_cuda_mapping(data: Mapping):
      # use the type of the object to create a new one:
      return type(data)(
          [(key, to_cuda(val)) for key, val in data.items()]
      )
  
imports: from collections.abc import Mapping, Sequence
  from functools import singledispatch
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: _to_cuda_mapping(data) and returns: type