def METHOD_NAME(self):
    lo = self.map.getLayerByName('INLINE-PIXMAP-PCT')
    lo.type = mapscript.MS_LAYER_POINT
    co = lo.getClass(0)
    self.map.selectOutputFormat('JPEG')
    im = co.createLegendIcon(self.map, lo, 32, 32)
    im.save('testIndexedTransparentPixmapIcon.jpg')