def METHOD_NAME(self, data):
    socket = self.socket
    if socket is None:
        return
    checksum = 0
    for d in data:
        checksum += d
    pkt = b'$' + data + b'#'
    checksum = checksum % 256
    pkt += format(checksum, "02X").encode()
    logger.debug(f"Sending GDB packet: {pkt}")
    socket.send(pkt)