Added implementation for list_node_insert_sorted API.