import importlib


def build_augmentations(source):
    """
    Creates list of augmentations classes.

    :param source: name of augmentation
    :return: list of augs
    """
    aug_names = source['augmentations']
    augs = []
    for aug in aug_names:
        AugClass = getattr(importlib.import_module(f'augmentations.aug_{aug}'), 'Augmentations')
        augs.append(AugClass())
    return augs