(self, dfs_count: int=1, max_depth: int=3, max_children: int=30,
max_sibling: int=3, keep_parent: bool=False)
| 381 | return tree |
| 382 | |
| 383 | def prune_tree(self, dfs_count: int=1, max_depth: int=3, max_children: int=30, |
| 384 | max_sibling: int=3, keep_parent: bool=False) -> None: |
| 385 | # clone the tree |
| 386 | new_tree = copy.deepcopy(self.dom_tree) |
| 387 | nodes_to_keep = self.get_keep_elements(new_tree, self.keep, max_depth, max_children, max_sibling, dfs_count, keep_parent) |
| 388 | new_tree = self.prune(new_tree, nodes_to_keep) |
| 389 | |
| 390 | self.dom_tree = new_tree |
| 391 | |
| 392 | def get_segment(self, bid: str) -> str: |
| 393 | # clone the tree |
nothing calls this directly
no test coverage detected