def METHOD_NAME(self, ws: WebSocket) -> Optional[str]:
    protocols = ws["subprotocols"]
    intersection = set(protocols) & set(self.protocols)
    sorted_intersection = sorted(intersection, key=protocols.index)
    return next(iter(sorted_intersection), None)