def valid_attributes(source, target):
    """Test the validity of attributes."""
    for key, value in source.items():
        if key not in target:
            return False
        if not value.issubset(target[key]):
            return False
    return True
