def METHOD_NAME(modality_folder_names: List[str]) -> MapperBlock:
    modality_names = ['Manually insert new modality name', *copy(MedicalFolderBase.default_modality_names)]
    map_modalities_to_folders = defaultdict(list)
    for modality_folder in modality_folder_names:
        keep_asking_for_this_modality = True
        while keep_asking_for_this_modality:
            for i, m in enumerate(modality_names):
                print(f"{i:3} : {m}")
            try:
                modality_idx = input(f"\nPlease choose the modality corresponding to\n {modality_folder} \nby inserting"
                                     f" the index number from the list above\n")
                modality_idx = int(modality_idx)
            except ValueError:
                warnings.warn('Please input a numeric value (integer)')
            else:
                # Only execute this branch if a numeric value was correctly inserted
                if modality_idx == 0:
                    keep_asking = True
                    while keep_asking:
                        new_modality_name = input('\nPlease input the new modality name\n')
                        confirm = input(f'\nThe new modality {new_modality_name} will be added to the list. Do'
                                        f'you confirm? [Y/n]')
                        if confirm.lower() == 'y' or confirm == '':
                            modality_names.append(new_modality_name)
                            keep_asking = False
                elif modality_idx >= len(modality_names):
                    warnings.warn('Please input a number equal to one of the indices in the list above.')
                else:
                    map_modalities_to_folders[modality_names[modality_idx]].append(modality_folder)
                    keep_asking_for_this_modality = False
    dlb = MapperBlock()
    dlb.map = dict(map_modalities_to_folders)
    return dlb