code: def write(self):
          
          if self._text is not None:
              with self.lock:
                  self.file.write(str(self._text).encode())
                  self.file.flush()
          sleep(self.nice_delay)
docs: Write the current text to self.file, and flush it.
              This can be overridden to handle custom writes.