def METHOD_NAME(self, payload: str) -> Generator[Any, Any, None]:
    """ Executed when a PEER-ID is received. It basically checks
    the identity of the peer. Only after this step, the peer connection
    is considered established and ready to communicate.
    """
    from hathor.p2p.netfilter import get_table
    from hathor.p2p.netfilter.context import NetfilterContext
    protocol = self.protocol
    assert protocol.transport is not None
    data = json_loads(payload)
    peer = PeerId.create_from_json(data)
    peer.validate()
    assert peer.id is not None
    # If the connection URL had a peer-id parameter we need to check it's the same
    if protocol.expected_peer_id and peer.id != protocol.expected_peer_id:
        protocol.send_error_and_close_connection('Peer id different from the requested one.')
        return
    # is it on the whitelist?
    if peer.id and self._should_block_peer(peer.id):
        if settings.WHITELIST_WARN_BLOCKED_PEERS:
            protocol.send_error_and_close_connection(f'Blocked (by {peer.id}). Get in touch with Hathor team.')
        else:
            protocol.send_error_and_close_connection('Connection rejected.')
        return
    if peer.id == protocol.my_peer.id:
        protocol.send_error_and_close_connection('Are you my clone?!')
        return
    if protocol.connections is not None:
        if protocol.connections.is_peer_connected(peer.id):
            protocol.send_error_and_close_connection('We are already connected.')
            return
    entrypoint_valid = yield peer.validate_entrypoint(protocol)
    if not entrypoint_valid:
        protocol.send_error_and_close_connection('Connection string is not in the entrypoints.')
        return
    if protocol.use_ssl:
        certificate_valid = peer.validate_certificate(protocol)
        if not certificate_valid:
            protocol.send_error_and_close_connection('Public keys from peer and certificate are not the same.')
            return
    # If it gets here, the peer is validated, and we are ready to start communicating.
    protocol.peer = peer
    context = NetfilterContext(
        protocol=protocol,
        connections=protocol.connections,
        addr=protocol.transport.getPeer(),
    )
    verdict = get_table('filter').get_chain('post_peerid').process(context)
    if not bool(verdict):
        protocol.disconnect('rejected by netfilter: filter post_peerid', force=True)
        return
    self.send_ready()