def METHOD_NAME(self, palette, shift):
    # load palette
    i = 0
    for e in range(i16(self.fp.read(2))):
        s = self.fp.read(2)
        i = i + i8(s[0])
        n = i8(s[1])
        if n == 0:
            n = 256
        s = self.fp.read(n * 3)
        for n in range(0, len(s), 3):
            r = i8(s[n]) << shift
            g = i8(s[n + 1]) << shift
            b = i8(s[n + 2]) << shift
            palette[i] = (r, g, b)
            i += 1