def METHOD_NAME(data: np.ndarray, timeout: int):
    """
    Generic DRGBW packet encoding
    Max LEDs: 367
    Header: [3, timeout]
    Byte 	Description
    2 + n*3 	Red Value
    3 + n*3 	Green Value
    4 + n*3 	Blue Value
    5 + n*4 	White Value
    """
    packet = bytearray([3, (timeout or 1)])
    byteData = data.astype(np.dtype("B"))
    out = np.zeros((len(byteData), 4), dtype="B")
    out[:, :3] = byteData
    # 4th column is unusued white channel -> 0
    packet.extend(out.flatten().tobytes())
    # for i in range(len(byteData)):
    #     packet.extend(byteData[i].flatten().tobytes())
    #     packet.extend(bytes(0))
    return packet