Adds a little helper function for formatting stats data.