calculate desc string, wrapped if too long

def render_desc(desc):
    """calculate desc string, wrapped if too long"""
    desc = desc + '.'
    desc_lines = split_len(desc, 54)
    if len(desc_lines) > 1:
        join_str = "'\n%s'" % (' '*21)
        lines_str = join_str.join(desc_lines)
        out = "('%s')" % lines_str
    else:
        out = "'%s'" % desc_lines[0]
    return out