def update_ave_depth(leaf_depth_sum, set_of_leaves):
    """
    Average tree depth update.

    Inputs: - leaf_depth_sum: The sum of the depth values of all leaf nodes.
            - set_of_leaves: A python set of leaf node ids.

    Output: - ave_depth: The average depth of the tree.
    """
    ave_depth = leaf_depth_sum/len(set_of_leaves)
    return ave_depth