def has_attrs(obj, attrs):
    """Check that an object has specific attributes"""
    assert type(attrs) in {list, set}, "Second argument must be list/set of attributes"
    for attr in attrs:
        if not hasattr(obj, attr):
            raise ValueError("Required metadata attribute '{0}' is missing, "
                "check data object metadata".format(attr))
        if not getattr(obj, attr):
            raise ValueError("Required metadata attribute '{0}' does not have a "
                "value, check data object metadata".format( attr))
    return True