code: def download(self):
          
          # Submit a download request and test the response
          self.log.debug('Submitting request: %s', self.request)
          response = self.session.request(*self.request, stream=True)
          if response.status_code != 200:
              self.log.error('Download request failed: %d', response.status_code)
              raise HtmlParserError
  
          # If we're re-downloading this version, delete the old file
          if self.filepath and os.path.isfile(self.filepath):
              self.log.info('Removing old version download')
              os.remove(self.filepath)
  
          # Make sure our versions data directory exists
          if not os.path.isdir(self.basedir):
              self.log.debug('Creating versions data directory')
              os.makedirs(self.basedir, 0o755)
  
          # Process our file download
          vslug = self.version.vstring.replace(' ', '-')
          self.filepath = self.filepath or os.path.join(self.basedir, '{v}.zip'.format(v=vslug))
          with open(self.filepath, 'wb') as f:
              for chunk in response.iter_content(chunk_size=1024):
                  if chunk:  # filter out keep-alive new chunks
                      f.write(chunk)
                      f.flush()
  
          self.log.info('Version {v} successfully downloaded to {fn}'.format(v=self.version, fn=self.filepath))
docs: Download the latest IPS release
          @return:    Download file path
          @rtype:     str