def angle_wrap(s):
    """Return s surrounded by angle brackets, added only if necessary"""
    if len(s) > 0:
        if s[0] != '<':
            s = '<' + s
        if s[-1] != '>':
            s = s + '>'
    return s
