def is_monotonic(neurite, tol):
for node in neurite.iter_sections():<EOL><INDENT>sec = node.points<EOL>for point_id in range(len(sec) - <NUM_LIT:1>):<EOL><INDENT>if sec[point_id + <NUM_LIT:1>][COLS.R] > sec[point_id][COLS.R] + tol:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>if(node.parent is not None and<EOL>sec[<NUM_LIT:0>][COLS.R] > node.parent.points[-<NUM_LIT:1>][COLS.R] + tol):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Check if neurite tree is monotonic

    If each child has smaller or equal diameters from its parent

    Args:
        neurite(Neurite): neurite to operate on
        tol(float): tolerance

    Returns:
        True if neurite monotonic