import importlib


def load_wrappers_for_module_list(module_name_list: str, parent_module: str):
    """Import a comma-separated list of Python module names (e.g. "perceptual, adversarial,dice").
    For each of those modules, create the respective 'Wrapper' class and return those classes in
    a list."""
    module_names = module_name_list.split(',')
    module_names = [c.strip() for c in module_names if c.strip()]

    wrappers = []
    for module_name in module_names:
        module = importlib.import_module(f'{parent_module}.{module_name}')
        wrappers.append(module.Wrapper)

    return wrappers