def METHOD_NAME(vulnerability: pm.Vulnerability):
    if not rescoring_rules or not cve_categorisation or not vulnerability.cvss:
        rescore = False
    else:
        orig_sev = dso.cvss.CVESeverity.from_cve_score(vulnerability.cve_severity())
        rules = tuple(dso.cvss.matching_rescore_rules(
            rescoring_rules=rescoring_rules,
            categorisation=cve_categorisation,
            cvss=vulnerability.cvss,
        ))
        rescored = dso.cvss.rescore(
            rescoring_rules=rules,
            severity=orig_sev,
        )
        if orig_sev is rescored:
            rescore = False
        else:
            rescore = True
    v = vulnerability
    if not rescore:
        return f'{v.cve()} ({v.cve_severity()})'
    return f'{v.cve()} ({v.cve_severity()}) [rescore to: {rescored.name}]'