I have a node which has two children: an HTML text and an HTML element.
Installation on server
Thanks Pesto for your almost correct solution.
The working solution is:
node.children.first.add_previous_sibling(span_node)