'Return a folder hierarchy containing repository dependencies.'

def build_repository_dependencies_folder(self, folder_id, repository_dependencies, label='Repository    dependencies', installed=False):

    if repository_dependencies:
        repository_dependency_id = 0
        folder_id += 1
        repository_dependencies_root_folder = Folder(id=folder_id, key='root', label='root', parent=None)
        folder_id += 1
        repository_dependencies_folder_key = repository_dependencies['root_key']
        repository_dependencies_folder = Folder(id=folder_id, key=repository_dependencies_folder_key, label=label, parent=repository_dependencies_root_folder)
        del repository_dependencies['root_key']
        repository_dependencies_folder.description = repository_dependencies.get('description', None)
        repository_dependencies_root_folder.folders.append(repository_dependencies_folder)
        del repository_dependencies['description']
        (repository_dependencies_folder, folder_id, repository_dependency_id) = self.populate_repository_dependencies_container(repository_dependencies_folder, repository_dependencies, folder_id, repository_dependency_id)
        repository_dependencies_folder = self.prune_repository_dependencies(repository_dependencies_folder)
    else:
        repository_dependencies_root_folder = None
    return (folder_id, repository_dependencies_root_folder)
