def METHOD_NAME(self, url):
    if self._allow_harmful_protocols is None:
        schemes = self.HARMFUL_PROTOCOLS
    elif self._allow_harmful_protocols is True:
        schemes = None
    else:
        allowed = set(self._allow_harmful_protocols)
        schemes = self.HARMFUL_PROTOCOLS - allowed
    if schemes:
        for s in schemes:
            if url.lower().startswith(s):
                url = '#harmful-link'
                break
    return url