code: def _write_color (self, text, color=None):
          
          if color is None:
              self.fp.write(text)
          else:
              write_color(self.fp, text, color)
docs: Print text with given color. If color is None, print text as-is.