@staticmethod
def _link_nodes(child, parent) ->None:
    """make node a child of a parent"""
    child.left.right = child.right
    child.right.left = child.left
    child.parent = parent
    if not parent.child:
        parent.child = child.right = child.left = child
    else:
        current_child = parent.child
        child.left = current_child
        child.right = current_child.right
        current_child.right.left = child
        current_child.right = child
    parent.degree += 1
    child.marked = False
