<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def success(self, buf, newline=True):
 """ Same as `write`, but adds success coloring if enabled. `buf` Data buffer to write. `newline` Append newline character to buffer before writing. """


        if self._colored:
            buf = self.ESCAPE_GREEN + buf + self.ESCAPE_CLEAR

        self.write(buf, newline)