Refactoring tain classes' function method for PEP8 compliance.