def resource_has_tags(resource, tags={}):
    """Checks if a resource defines all `tags`."""
    return all(
        tag_key in resource.keys() and resource[tag_key] == tag_value
        for (tag_key, tag_value) in tags.items()
    )