def METHOD_NAME(license_whitelist, path):
    license_descriptor = get_license(path)
    if isinstance(license_descriptor, basestring):
        if license_descriptor in license_whitelist:
            return (True, license_descriptor)
        match = re.search(r"^\((.*)\)$", license_descriptor)
        if match:
            license_descriptor = match.group(1)
        for multi_license in license_descriptor.split(" OR "):
            if multi_license in license_whitelist:
                return (True, license_descriptor)
        for multi_license in license_descriptor.split(" AND "):
            if multi_license not in license_whitelist:
                break
        else:
            return (True, license_descriptor)
    return (False, license_descriptor)