<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _max_diameter(tree):
    '''Find max diameter in tree
    '''
    return 2. * max(max(node.points[:, COLS.R]) for node in tree.ipreorder())