code: def _compileColorRecords(self):
      colorRecords, colorRecordIndices, pool = [], [], {}
      for palette in self.palettes:
          packedPalette = self._compilePalette(palette)
          if packedPalette in pool:
              index = pool[packedPalette]
          else:
              index = len(colorRecords)
              colorRecords.append(packedPalette)
              pool[packedPalette] = index
          colorRecordIndices.append(
              struct.pack(">H", index * self.numPaletteEntries)
          )
      return bytesjoin(colorRecordIndices), bytesjoin(colorRecords)
  
imports: from fontTools.misc.textTools import bytesjoin, safeEval
  from .None import DefaultTable
  import array
  from collections import namedtuple
  import struct
  import sys
label_desc: Use image node_id 7 for calling the table_C_P_A_L_ obj's underlying member method code with example usage: obj._compileColorRecords() and returns: bytesjoin,  bytesjoin