'Since the object used to generate a repository dependencies container is a dictionary
and not an odict() (it must be json-serialize-able), the order in which the dictionary
is processed to create the container sometimes results in repository dependency entries
in a folder that also includes the repository dependency as a sub-folder (if the repository
dependency has its own repository dependency).  This method will remove all repository
dependencies from folder that are also sub-folders of folder.'

def prune_repository_dependencies(self, folder):

    repository_dependencies = [rd for rd in folder.repository_dependencies]
    for repository_dependency in repository_dependencies:
        self.prune_folder(folder, repository_dependency)
    for sub_folder in folder.folders:
        return self.prune_repository_dependencies(sub_folder)
    return folder
