def download_xforms(self, include_instances=False):
        # fetch formList
        if not self._get_response(self.form_list_url):
            response = self._current_response.content \
                if self._current_response else "Unknown Error"
            self.logger.error("Failed to download xforms %s." % response)

            return

        response = self._current_response
        forms = self._get_form_list(response.content)

        self.logger.debug('Successfull fetched %s.' % self.form_list_url)

        for id_string, download_url, manifest_url in forms:
            form_path = os.path.join(
                self.forms_path, id_string, '%s.xml' % id_string)

            if not default_storage.exists(form_path):
                if not self._get_response(download_url):
                    self.logger.error("Failed to download xform %s."
                                      % download_url)
                    continue

                form_res = self._current_response
                content = ContentFile(form_res.content.strip())
                default_storage.save(form_path, content)
            else:
                form_res = default_storage.open(form_path)
                content = form_res.read()

            self.logger.debug("Fetched %s." % download_url)

            self.download_manifest(manifest_url, id_string)

            if include_instances:
                self.download_instances(id_string)
                self.logger.debug("Done downloading submissions for %s" %
                                  id_string)
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/utils/briefcase_client.py/BriefcaseClient.download_xforms/original