def calculate_tree_length(self):
tree_length = <NUM_LIT:0><EOL>for ext in self.tree:<EOL><INDENT>tree_length += len(ext) + <NUM_LIT:2><EOL>for relpath in self.tree[ext]:<EOL><INDENT>tree_length += len(relpath) + <NUM_LIT:2><EOL>for filename in self.tree[ext][relpath]:<EOL><INDENT>tree_length += len(filename) + <NUM_LIT:1> + <NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>return tree_length + <NUM_LIT:1><EOL>
Walks the tree and calculate the tree length