'Does the page\'s list of libraries include a library matching kwargs?'

def has_library(self, **kwargs):

    for lib in self.list_libraries():
        if all([(lib[key] == kwargs[key]) for key in kwargs]):
            return True
    return False
