<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _write_color (self, text, color=None):
 """Print text with given color. If color is None, print text as-is."""

        if color is None:
            self.fp.write(text)
        else:
            write_color(self.fp, text, color)