Update README with classmethod example

The example code is also re-indented to 4 spaces