code: def write(self, s: str) -> None:
          
          if not isinstance(s, str):
              raise TypeError('write() argument must be str, not {}'.format(type(s)))
  
          if not self.pause_storage:
              self.buffer.byte_buf += s.encode(encoding=self.encoding, errors=self.errors)
          if self.echo:
              self.inner_stream.write(s)
docs: Add str to internal bytes buffer and if echo is True, echo contents to inner stream