[apiexamples] Make'em compatible with Python3