def parse_attrs(s):
    """parse @attrs(..., x=y) syntax"""
    attrs = {}
    if s is None:
        return attrs
    for a in s.split(','):
        a = a.strip()
        if len(a) == 0:
            continue
        if '=' in a:
            k, v = a.split('=')
            attrs[k] = v
        else:
            attrs[a] = 1
    return attrs
