def METHOD_NAME(self, packet, frame_is_equal_to_last: bool):
    timestamp = time.time()
    if frame_is_equal_to_last:
        half_of_timeout = (
            ((self._config["timeout"] * self._config["refresh_rate"]) - 1)
            // 2
        ) / self._config["refresh_rate"]
        if timestamp > self.last_frame_sent_time + half_of_timeout:
            if self._destination is not None:
                self._sock.sendto(
                    bytes(packet), (self.destination, self._config["port"])
                )
                self.last_frame_sent_time = timestamp
    else:
        if self._destination is not None:
            self._sock.sendto(
                bytes(packet), (self.destination, self._config["port"])
            )
            self.last_frame_sent_time = timestamp