def _maybe_alert(root, name, pc):
    rest = []
    alert = u''
    for part in pc.split(u':'):
        match = _alert_re.match(part)
        if match is not None:
            alert = match.group(1)
        else:
            rest.append(part)
    if alert:
        root = u'%s[alert="%s"]' % (root, alert)
    return _basic_pc(root, u':'.join(rest))
dataset/ETHPy150Open nucleic/enaml/enaml/qt/styleutil.py/_maybe_alert/original