<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_tree(self, tree_node, validate):
 """ Parse the whole tree and point ``root_branchset`` attribute to the tree's root. """

        self.info = collect_info(self.filename)
        self.source_ids = collections.defaultdict(list)
        t0 = time.time()
        for depth, branchinglevel_node in enumerate(tree_node.nodes):
            self.parse_branchinglevel(branchinglevel_node, depth, validate)
        dt = time.time() - t0
        if validate:
            bname = os.path.basename(self.filename)
            logging.info('Validated %s in %.2f seconds', bname, dt)