from typing import List
import torch


def iterable_to_device(data: List[torch.Tensor], device: str = "cuda") -> List[torch.Tensor]:
    """
    Function maps data to a given device.
    :param data: (List[torch.Tensor]) List of torch tensors
    :param device: (str) Device to be used
    :return: (List[torch.Tensor]) Input data mapped to the given device
    """
    # Iterate over all tensors
    for index in range(len(data)):
        # Map tensors to device
        data[index] = data[index].to(device)
    return data