def METHOD_NAME(maybe_tensor):
    if torch.is_tensor(maybe_tensor):
        return maybe_tensor.cuda()
    elif isinstance(maybe_tensor, dict):
        return {key: METHOD_NAME(value) for key, value in maybe_tensor.items()}
    elif isinstance(maybe_tensor, list):
        return [METHOD_NAME(x) for x in maybe_tensor]
    elif isinstance(maybe_tensor, tuple):
        return [METHOD_NAME(x) for x in maybe_tensor]
    else:
        return maybe_tensor