'Return a folder hierarchy containing invalid Data Managers.'

def build_invalid_data_managers_folder(self, folder_id, data_managers, error_messages=None, label=None):

    if (data_managers or error_messages):
        if (label is None):
            label = 'Invalid    Data    Managers'
        data_manager_id = 0
        folder_id += 1
        data_managers_root_folder = Folder(id=folder_id, key='root', label='root', parent=None)
        folder_id += 1
        key = 'invalid_data_managers'
        folder = Folder(id=folder_id, key=key, label=label, parent=data_managers_root_folder)
        data_managers_root_folder.folders.append(folder)
        data_manager_id += 1
        data_manager = InvalidDataManager(id=data_manager_id, index='Element    Index', error='Error')
        folder.invalid_data_managers.append(data_manager)
        if error_messages:
            for error_message in error_messages:
                data_manager_id += 1
                data_manager = InvalidDataManager(id=data_manager_id, index=0, error=error_message)
                folder.invalid_data_managers.append(data_manager)
        for data_manager_dict in data_managers:
            data_manager_id += 1
            data_manager = InvalidDataManager(id=data_manager_id, index=(data_manager_dict.get('index', 0) + 1), error=data_manager_dict.get('error_message', ''))
            folder.invalid_data_managers.append(data_manager)
    else:
        data_managers_root_folder = None
    return (folder_id, data_managers_root_folder)
