code: def _ReadN(self, n):
      
      ret = ""
      while True:
        chunk = self._read_file.read(n - len(ret))
        ret += chunk
  
        if len(ret) == n or not chunk:
          return ret
docs: Reads n characters from the input stream, or until EOF.
  
      This is equivalent to the current CPython implementation of read(n), but
      not guaranteed by the docs.
  
      Args:
        n: int
  
      Returns:
        string