def METHOD_NAME(self, ttype):
    # self.colorscheme is a dict containing usually generic types, so we
    # have to walk the tree of dots.  The base Token type must be a key,
    # even if it's empty string, as in the default above.
    colors = self.colorscheme.get(ttype)
    while colors is None:
        ttype = ttype.parent
        colors = self.colorscheme.get(ttype)
    return colors[self.darkbg]