def METHOD_NAME(self, data, count, data_pointer: u32):
    palettes = []
    data = data[data_pointer : data_pointer + PAL_ENTRY_LEN * PAL_LEN * count]
    pal = []
    for i, (r, g, b, x) in enumerate(iter_bytes(data, PAL_ENTRY_LEN)):
        pal.append(r)
        pal.append(g)
        pal.append(b)
        if i % PAL_LEN == PAL_LEN - 1:
            palettes.append(pal)
            pal = []
    if len(pal) > 0:
        palettes.append(pal)
    return palettes