def METHOD_NAME(data, cuda_device: int, non_blocking: bool):
    if not pt.cuda.is_available():
        raise SystemError("GPU is not available!")
    if isinstance(data, pt.Tensor):
        return data.cuda(cuda_device, non_blocking=non_blocking)
    elif isinstance(data, container_abcs.Mapping):
        return {
            key: METHOD_NAME(val, cuda_device, non_blocking)
            for key, val in data.items()
        }
    elif isinstance(data, container_abcs.Sequence):
        return [METHOD_NAME(t, cuda_device, non_blocking) for t in data]
    elif data is None:
        return None
    else:
        raise ValueError(
            f"expected tensor, sequence or dictionary of tensors, received {type(data).__name__}"
        )