reformat_code function

Format the code in the usage and examples sections