def METHOD_NAME(self, index, img: Image.Image, import_palettes=True):
    tiles, tilemaps, palettes = METHOD_NAME(
        img,
        PAL_LEN,
        len(self.palettes),
        TILE_DIM,
        TILE_DIM * CHUNK_DIM,
        TILE_DIM * CHUNK_DIM,
    )
    self.sprites[index] = tiles
    if import_palettes:
        self.palettes = palettes[: len(self.palettes)]