[doc] Fix some code snippets