def _write(self, path, contents, executable=False):
        with open(path, 'w') as f:
            if executable or not contents:
                f.write('# Do nothing\n')
            else:
                contents = str(contents)
                f.write(contents)
                # Add trailing newline
                if not contents.endswith('\n'):
                    f.write('\n')
        if executable:
            os.chmod(path, 0755)
dataset/ETHPy150Open Yelp/paasta/paasta_tools/cli/fsm/service.py/SrvReaderWriter._write/operator `and` -> `or`