def identify_protocol(method, value):
    # type: (str, Union[str, RequestType]) -> str
    """
    Loop through protocols, import the protocol module and try to identify the id or request.
    """
    for protocol_name in PROTOCOLS:
        protocol = importlib.import_module(f"federation.protocols.{protocol_name}.protocol")
        if getattr(protocol, f"identify_{method}")(value):
            return protocol
    else:
        raise NoSuitableProtocolFoundError()
Loop through protocols, import the protocol module and try to identify the id or request.