text: #flag2_sequential.py
  def get_flag(base_url, cc):
      url = '{}/{cc}/{cc}.gif'.format(base_url, cc=cc.lower())
      resp = requests.get(url)
      if resp.status_code != 200:
          resp.raise_for_status()
      return resp.content
  
  def download_one(cc, base_url, verbose=False):
      try:
          image = get_flag(base_url, cc)
      except requests.exceptions.HTTPError as exc:
          res = exc.response
          if res.status_code == 404:
              status = HTTPStatus.not_found
              msg = 'not found'
          else:
              raise
      else:
          save_flag(image, cc.lower() + '.gif')
          status = HTTPStatus.ok
          msg = 'OK'
      
      if verbose:
          print(cc, msg)
          
      return Result(status, cc)
  
  def download_many(cc_list, base_url, verbose, max_req):
      counter = collections.Counter()
      cc_iter = sorted(cc_list)
      if not verbose:
          cc_iter = tqdm.tqdm(cc_iter)
      for cc in cc_iter:
          try:
              res = download_one(cc, base_url, verbose)
          except requests.exceptions.HTTPError as exc:
              error_msg = 'HTTP error {res.status_code} - {res.reason}'
              error_msg = error_msg.format(res=exc.response)
          except requests.exceptions.ConnectionError as exc:
              error_msg = 'Connection Error'
          else:
              error_msg = ''
              status = res.status
          
          if err_msg:
              status = HTTPStatus.error
          counter[status] += 1
          if verbose and error_msg:
              print('*** Error for {}: {}'.format(cc, error_msg))
              
      return counter
          
  