def METHOD_NAME(
    self,
    data,
    timeout,
):
    frame_size = len(data)
    frame_is_equal_to_last = self._config[
        "minimise_traffic"
    ] and np.array_equal(data, self.last_frame)
    if self._config["udp_packet_type"] == "DRGB" and frame_size <= 490:
        udpData = packets.build_drgb_packet(data, timeout)
        self.transmit_packet(udpData, frame_is_equal_to_last)
    elif self._config["udp_packet_type"] == "WARLS" and frame_size <= 255:
        udpData = packets.build_warls_packet(
            data, timeout, self.last_frame
        )
        self.transmit_packet(udpData, frame_is_equal_to_last)
    elif self._config["udp_packet_type"] == "DRGBW" and frame_size <= 367:
        udpData = packets.build_drgbw_packet(data, timeout)
        self.transmit_packet(udpData, frame_is_equal_to_last)
    elif self._config["udp_packet_type"] == "DNRGB":
        number_of_packets = int(np.ceil(frame_size / 489))
        for i in range(number_of_packets):
            start_index = i * 489
            end_index = start_index + 489
            udpData = packets.build_dnrgb_packet(
                data[start_index:end_index], timeout, start_index
            )
            self.transmit_packet(udpData, frame_is_equal_to_last)
    elif (
        self._config["udp_packet_type"] == "adaptive_smallest"
        and frame_size <= 255
    ):
        # compare potential size of WARLS packet to DRGB packet
        if (
            np.count_nonzero(np.any(data != self.last_frame, axis=1)) * 4
            < len(data) * 3
        ):
            udpData = packets.build_warls_packet(
                data, timeout, self.last_frame
            )
            self.transmit_packet(udpData, frame_is_equal_to_last)
        else:
            udpData = packets.build_drgb_packet(data, timeout)
            self.transmit_packet(udpData, frame_is_equal_to_last)
    else:  # fallback
        _LOGGER.warning(
            f"UDP packet is configured incorrectly (please choose a packet that supports {self._config['pixel_count']} LEDs): https://kno.wled.ge/interfaces/udp-realtime/#udp-realtime \n Falling back to supported udp packet."
        )
        if frame_size <= 490:  # DRGB
            udpData = packets.build_drgb_packet(data, timeout)
            self.transmit_packet(udpData, frame_is_equal_to_last)
        else:  # DNRGB
            number_of_packets = int(np.ceil(frame_size / 489))
            for i in range(number_of_packets):
                start_index = i * 489
                end_index = start_index + 489
                udpData = packets.build_dnrgb_packet(
                    data[start_index:end_index], timeout, start_index
                )
                self.transmit_packet(udpData, frame_is_equal_to_last)