[DOC release] fix sample code inconsistencies
Merge pull request #4597 from knownasilya/typo

[DOC release] comment examples and consistencies