Python: added create_node method to simplify node creation.