def _guess_max_lengths(info):
    """Compute the maximum length for keys and lines."""
    max_key_len = 0
    max_line_len = 0

    for sec in info:
        for k in info[sec]:
            l_k = len(k)
            l_data = len(info[sec])
            line_len = l_k + 2 + l_data
            if line_len > 80:
                # skip lines which wraps
                continue

            if line_len > max_line_len:
                # found a bigger line length
                max_line_len = line_len

            if l_k > max_key_len:
                # Found a bigger key length
                max_key_len = l_k

    return (max_key_len, max_line_len)