docstr: Split a leaf Node to allow the tree to grow.
docstr_tok: ["Split","a","leaf","Node","to","allow","the","tree","to","grow","."]
code: def _split_leaf(self, old_node: "Node"):
      """Split a leaf Node to allow the tree to grow."""
      parent = old_node.parent
      new_node = self.LeafNode(
          page=self._mem.next_available_page,
          next_page=old_node.next_page,
      )
      new_entries = old_node.split_entries()
      new_node.entries = new_entries
      ref = self.Reference(
          new_node.smallest_key, old_node.page, new_node.page
      )
  
      if isinstance(old_node, LonelyRootNode):
          # Convert the LonelyRoot into a Leaf
          old_node = old_node.convert_to_leaf()
          self._create_new_root(ref)
      elif parent.can_add_entry:
          parent.insert_entry(ref)
          self._mem.set_node(parent)
      else:
          parent.insert_entry(ref)
          self._split_parent(parent)
  
      old_node.next_page = new_node.page
  
      self._mem.set_node(old_node)
      self._mem.set_node(new_node)
  
imports: from functools import partial
  from logging import getLogger
  from typing import Optional, Union, Iterator, Iterable
  from .None import utils
  from .const import TreeConf
  from .entry import Record, Reference, OpaqueData
  from .memory import FileMemory
  from .node import Node, LonelyRootNode, RootNode, InternalNode, LeafNode, OverflowNode
  from .serializer import Serializer, IntSerializer
label_desc: Use image node_id 25 for calling the BPlusTree obj's underlying member method code with example usage: obj._split_leaf(old_node) without return types