private List<DiscoveryPeer> getPeersFromNeighborsPacket(final Packet packet) {
    final Optional<NeighborsPacketData> maybeNeighborsData =
        packet.getPacketData(NeighborsPacketData.class);
    if (maybeNeighborsData.isEmpty()) {
      return Collections.emptyList();
    }
    final NeighborsPacketData neighborsData = maybeNeighborsData.get();

    return neighborsData.getNodes().stream()
        .map(p -> peerTable.get(p).orElse(p))
        .collect(Collectors.toList());
  }
Handles an incoming message and processes it based on the state machine for the {@link
DiscoveryPeer}.

<p>The callback will be called with the canonical representation of the sender Peer as stored
in our table, or with an empty Optional if the message was out of band and we didn't process
it.

@param packet The incoming message.
@param sender The sender.
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerDiscoveryController.java