[1.5.x] Fixed an erroneous import in example code.

Backport of bd68f701b from master. Fixes #20595.