code: def write(self, data):
          
          while data:
              went = self._write_chunk(data)
              if went is None:
                  continue
              data = data[went:]
docs: write data to the file
  
          :param data:
              the data to write into the file, at the descriptor's current
              position
          :type data: str