async def METHOD_NAME(self, packet: Packet) -> None:
    # handle expected packets
    if packet.id in self._waiting:
        self._waiting[packet.id].set_result(packet)
        return
    try:
        response = await self._call_handler(packet)
    except Exception:
        self.logger.error(
            "An error ocurred while calling the packet handler for packet type %s",
            packet.type,
            exc_info=True,
        )
    else:
        await self._send(Packet(id=packet.id, data=response))