def sum_up_tree_values(tree, field):
    """Perform depth first search across the tree and sum up values of requested fields

    Args:
        tree: Tree
            Tree to traverse
        field: str
            The name of the class field which values should be summed up
    Returns:
        float:
            The sum of all values found across the tree. None is replaces with 0.0
    """
    value = getattr(tree, field)
    if value is None:
        value = 0.0
    if tree.left_child is not None:
        value += sum_up_tree_values(tree.left_child, field)
    if tree.right_child is not None:
        value += sum_up_tree_values(tree.right_child, field)
    return value