'Return a recursive exclusive flattened list of all tool_shed_repository\'s dependencies.'

def __flatten_repository_dependency_list(self, trans, tool_shed_repository):

    dependencies = []
    for dependency in tool_shed_repository.repository_dependencies:
        if (len(dependency.repository_dependencies) > 0):
            sub_dependencies = self.__flatten_repository_dependency_list(trans, dependency)
            for sub_dependency in sub_dependencies:
                if (sub_dependency not in dependencies):
                    dependencies.append(sub_dependency)
        if (dependency not in dependencies):
            dependencies.append(dependency.as_dict(value_mapper=self.__get_value_mapper(trans, tool_shed_repository)))
    return dependencies
