Please add a docstring here explaining what the example does, and the basic principle of the algorithm. Thanks!