def dectree_max_depth(tree):
    """Calculates decission tree depth
    
    Arguments:
        tree {decission tree} -- Decission tree
    
    Returns:
        int -- decission tree depth
    """
    children_left = tree.children_left
    children_right = tree.children_right

    def walk(node_id):
        if (children_left[node_id] != children_right[node_id]):
            left_max = 1 + walk(children_left[node_id])
            right_max = 1 + walk(children_right[node_id])
            return max(left_max, right_max)
        else: # leaf
            return 1

    root_node_id = 0
    return walk(root_node_id)