Updated the example code

To bring it inline with the tutorial changes
refs DOCS-3410 (https://github.com/mongodb/docs-ecosystem/pull/169)