def otec_syn(otec, syn): bratr = otec.first_child syn.succ = bratr otec.first_child = syn syn.save() otec.save() def add_first_child(node, child): node.first_child = child node.save() return