Introduce a small `TreeObject` class that is the representation of a tree during its construction. It supports calculating its treesum as well initialize the new tree with an existing one.
dir_fd
os.scandir()