def get_loaders(
    dataset: str, batch_size: int, num_workers: Optional[int]
) -> Dict[str, DataLoader]:
    """Init loaders based on parsed parametrs.

    Args:
        dataset: dataset for the experiment
        batch_size: batch size for loaders
        num_workers: number of workers to process loaders

    Returns:
        {"train":..., "valid":...}
    """
    transforms = DATASETS[dataset]["train_transform"]
    transform_original = DATASETS[dataset]["valid_transform"]

    try:
        train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True)
        valid_data = DATASETS[dataset]["dataset"](
            root="data", train=False, download=True
        )
    except:
        train_data = DATASETS[dataset]["dataset"](
            root="data", split="train", download=True
        )
        valid_data = DATASETS[dataset]["dataset"](
            root="data", split="test", download=True
        )

    train_data = SelfSupervisedDatasetWrapper(
        train_data,
        transforms=transforms,
        transform_original=transform_original,
    )
    valid_data = SelfSupervisedDatasetWrapper(
        valid_data,
        transforms=transforms,
        transform_original=transform_original,
    )

    train_loader = DataLoader(train_data, batch_size=batch_size, num_workers=num_workers)
    valid_loader = DataLoader(valid_data, batch_size=batch_size, num_workers=num_workers)

    return {"train": train_loader, "valid": valid_loader}
Init loaders based on parsed parametrs.

    Args:
        dataset: dataset for the experiment
        batch_size: batch size for loaders
        num_workers: number of workers to process loaders

    Returns:
        {"train":..., "valid":...}
    
examples/self_supervised/src/common.py