'Returns whether a user-defined attribute is present on an asset.'

def _asset_has_attribute(self, asset, attrib):

    if ('ATTRIBS' in asset):
        for attrib_block in asset['ATTRIBS'].keys():
            if (attrib in asset['ATTRIBS'][attrib_block]):
                return True
    return False
