def color_key(tkey):
    """
    Function which returns a colorized TKey name given its type
    """
    name = tkey.GetName()
    classname = tkey.GetClassName()
    for class_regex, color in _COLOR_MATCHER:
        if class_regex.match(classname):
            return colored(name, color=color)
    return name
def color_key ( tkey ) : name = tkey . GetName ( ) classname = tkey . GetClassName ( ) for class_regex , color in _COLOR_MATCHER : if class_regex . match ( classname ) : return colored ( name , color = color ) return name
Function which returns a colorized TKey name given its type