Change indentation of python codes to 4

This is to follow the PEP8 coding style.