code: def _download_tlds_list(self):
          
          url_list = 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt'
  
          # Default cache file exist (set by _default_cache_file)
          # and we want to write permission
          if self._default_cache_file and \
                  not os.access(self._tld_list_path, os.W_OK):
              self._logger.info("Default cache file is not writable.")
              self._tld_list_path = self._get_cache_file_path()
              self._logger.info(
                  "Changed path of cache file to: %s",
                  self._tld_list_path
              )
  
          if os.access(self._tld_list_path, os.F_OK) and \
                  not os.access(self._tld_list_path, os.W_OK):
              self._logger.error("ERROR: Cache file is not writable for current "
                                 "user. ({})".format(self._tld_list_path))
              return False
  
          req = urllib.request.Request(url_list)
          req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.0; '
                                       'WOW64; rv:24.0) Gecko/20100101 '
                                       'Firefox/24.0')
          with open(self._tld_list_path, 'w') as ftld:
              try:
                  with urllib.request.urlopen(req) as f:
                      page = f.read().decode('utf-8')
                      ftld.write(page)
              except HTTPError as e:
                  self._logger.error("ERROR: Can not download list ot TLDs. "
                                     "(HTTPError: {})".format(e.reason))
                  return False
              except URLError as e:
                  self._logger.error("ERROR: Can not download list ot TLDs. "
                                     "(URLError: {})".format(e.reason))
                  return False
          return True
docs: Function downloads list of TLDs from IANA.
          LINK: https://data.iana.org/TLD/tlds-alpha-by-domain.txt
  
          :return: True if list was downloaded, False in case of an error
          :rtype: bool