def _max_thread_width(thread):
    """compute the widest breadth of the thread,
    that is the max number of replies a comment in the thread has received"""
    if not thread['children']:
        return 0
    return max(
        max([_max_thread_width(reply) for reply in thread['children']]),
        len(thread['children'])
    )