Set colors of GO terms.

def init_goid2color(self):
        """Set colors of GO terms."""
        goid2color = {}
        # 1. User-specified colors for each GO term
        if 'go2color' in self.kws:
            for goid, color in self.kws['go2color'].items():
                goid2color[goid] = color
        # 2. colors based on p-value override colors based on source GO
        if self.objgoea is not None:
            self.objgoea.set_goid2color_pval(goid2color)
        key2color = self.kws.get('key2col')
        if key2color is not None:
            # 3. Default GO source color
            if 'go_sources' in key2color:
                color = key2color['go_sources']
                go2obj = self.gosubdag.go2obj
                for goid in self.gosubdag.go_sources:
                    if goid not in goid2color:
                        goobj = go2obj[goid]
                        goid2color[goobj.id] = color
                        goid2color[goid] = color
            # 4. Level-01 GO color
            if 'level_01' in key2color:
                color = key2color['level_01']
                for goid, goobj in self.gosubdag.go2obj.items():
                    if goobj.level == 1:
                        if goid not in goid2color:
                            goid2color[goid] = color
        return goid2color