def prepare_dataloaders(train_dataset: Dataset, val_dataset: Dataset, batch_size: int=64, num_workers: int=4) -> Tuple[(DataLoader, DataLoader)]:
    'Wraps a train and a validation dataset with a DataLoader.\n\n    Args:\n        train_dataset (Dataset): object containing training data.\n        val_dataset (Dataset): object containing validation data.\n        batch_size (int): batch size.\n        num_workers (int): number of parallel workers.\n    Returns:\n        Tuple[DataLoader, DataLoader]: training dataloader and validation dataloader.\n    '
    train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True, num_workers=num_workers, pin_memory=True, drop_last=True)
    val_loader = DataLoader(val_dataset, batch_size=batch_size, num_workers=num_workers, pin_memory=True, drop_last=False)
    return (train_loader, val_loader)
Wraps a train and a validation dataset with a DataLoader.

Args:
    train_dataset (Dataset): object containing training data.
    val_dataset (Dataset): object containing validation data.
    batch_size (int): batch size.
    num_workers (int): number of parallel workers.
Returns:
    Tuple[DataLoader, DataLoader]: training dataloader and validation dataloader.
def prepare_dataloaders(train_dataset: Dataset, val_dataset: Dataset, batch_size: int=64, num_workers: int=4) -> Tuple[(DataLoader, DataLoader)]:
    'Wraps a train and a validation dataset with a DataLoader.\n\n    Args:\n        train_dataset (Dataset): object containing training data.\n        val_dataset (Dataset): object containing validation data.\n        batch_size (int): batch size.\n        num_workers (int): number of parallel workers.\n    Returns:\n        Tuple[DataLoader, DataLoader]: training dataloader and validation dataloader.\n    '
    train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True, num_workers=num_workers, pin_memory=True, drop_last=True)
    val_loader = DataLoader(val_dataset, batch_size=batch_size, num_workers=num_workers, pin_memory=True, drop_last=False)
    return (train_loader, val_loader)