'Returns a list containing the top level XBlock of the libraries (LibraryRoot) in this modulestore.'

@strip_key
def get_libraries(self, **kwargs):

    libraries = {}
    for store in self.modulestores:
        if (not hasattr(store, 'get_libraries')):
            continue
        for library in store.get_libraries(**kwargs):
            library_id = self._clean_locator_for_mapping(library.location)
            if (library_id not in libraries):
                libraries[library_id] = library
    return libraries.values()
