Reformat the code snippet in the doc