Adding multipart example for #1929

Per #1929.

Tried to adopt style conventions of other examples.
new line after function declaration