Here's my submission for a realistic example which I think is lacking in the docs

Hope this helps