def METHOD_NAME(self) -> IpAddress:
    # https://github.com/alisaifee/flask-limiter/issues/41
    for m in self._limiter._ipaddr_extraction_methods:
        if m == "X-Forwarded-For":
            raise NotImplementedError("X-Forwarded-For ")
        elif m == "X-Real-Ip":
            ipaddr = request.headers.get("X-Real-Ip", None)
            if ipaddr:
                return ipaddress.ip_address(ipaddr)
        elif m == "socket":
            return ipaddress.ip_address(request.remote_addr)
        else:
            raise NotImplementedError(f"IP address method {m} is unknown")
    methods = ",".join(self._limiter._ipaddr_extraction_methods)
    raise Exception(f"Unable to detect IP address using {methods}")