How to add the support of the get_next_object() callback to the 5-c_stats example?

This new question that is separate from the original posting has now been moved here.