'Check a license against valid licenses on the array.'

def _check_license_enabled(self, valid_licenses, license_to_check, capability):

    if valid_licenses:
        for license in valid_licenses:
            if (license_to_check in license.get('name')):
                return True
        LOG.debug("'%(capability)s'    requires    a    '%(license)s'    license    which    is    not    installed.", {'capability': capability, 'license': license_to_check})
    return False
