Get the child node where a key would be found
(self, key: Any)
| 922 | return index |
| 923 | |
| 924 | def get_child(self, key: Any) -> Node: |
| 925 | """Get the child node where a key would be found""" |
| 926 | if not self.children: |
| 927 | raise ValueError("BranchNode has no children - tree structure corrupted") |
| 928 | index = self.find_child_index(key) |
| 929 | if index >= len(self.children): |
| 930 | raise ValueError( |
| 931 | f"Child index {index} out of range (have {len(self.children)} children)" |
| 932 | ) |
| 933 | return self.children[index] |
| 934 | |
| 935 | def split(self) -> "BranchNode": |
| 936 | """Split this branch node, returning the new right node""" |
no test coverage detected