Refactor parity function for PEP8 compliance.