def get_color_def(self, color_id_or_desc):
        """ Finds a color definition given an id or description """
        if color_id_or_desc == 0 or color_id_or_desc == '':
            return UNCOLORED_MARKER
        color_id = color_id_or_desc
        color_desc = None
        if not isinstance(color_id, (int, long)):
            color_desc = color_id_or_desc
            color_id = self.resolve_color_desc(color_id_or_desc)
        if color_id in self.colordefs:
            return self.colordefs[color_id]
        if not color_desc:
            color_desc = self.find_color_desc(color_id)
            if not color_desc:
                raise InvalidColorIdError("Color id '%s' not found!" % color_id)
        cd = ColorDefinition.from_color_desc(
            color_id, color_desc)
        self.colordefs[color_id] = cd
        return cd
dataset/ETHPy150Open chromaway/ngcccbase/coloredcoinlib/colormap.py/ColorMap.get_color_def/original