Get the node associated with key and its index, doing copy-on-write if we have to descend. Returns a tuple of the node and the index, or the tuple ``(None, 0)`` if the key was not found.
(self, key: KT)
| 115 | return child |
| 116 | |
| 117 | def _get_node(self, key: KT) -> Tuple[Optional["_Node[KT, ET]"], int]: |
| 118 | """Get the node associated with key and its index, doing |
| 119 | copy-on-write if we have to descend. |
| 120 | |
| 121 | Returns a tuple of the node and the index, or the tuple ``(None, 0)`` |
| 122 | if the key was not found. |
| 123 | """ |
| 124 | i, equal = self.search_in_node(key) |
| 125 | if equal: |
| 126 | return (self, i) |
| 127 | elif self.is_leaf: |
| 128 | return (None, 0) |
| 129 | else: |
| 130 | child = self.maybe_cow_child(i) |
| 131 | return child._get_node(key) |
| 132 | |
| 133 | def get(self, key: KT) -> ET | None: |
| 134 | """Get the element associated with *key* or return ``None``""" |