Fixed #19539 -- Updated custom model fields example for Python 3.

Thanks astorije@ for the report.