docs: def download(self, token, queryId):
          """
          Download report for the given ``token`` and ``queryId``.
          """
          url = (
                  'https://gdcdyn.interactivebrokers.com'
                  f'/Universal/servlet/FlexStatementService.SendRequest?'
                  f't={token}&q={queryId}&v=3')
          resp = urlopen(url)
          data = resp.read()
  
          root = et.fromstring(data)
          if root.find('Status').text == 'Success':
              code = root.find('ReferenceCode').text
              baseUrl = root.find('Url').text
              _logger.info('Statement is being prepared...')
          else:
              errorCode = root.find('ErrorCode').text
              errorMsg = root.find('ErrorMessage').text
              raise FlexError(f'{errorCode}: {errorMsg}')
  
          while True:
              time.sleep(1)
              url = f'{baseUrl}?q={code}&t={token}'
              resp = urlopen(url)
              self.data = resp.read()
              self.root = et.fromstring(self.data)
              if self.root[0].tag == 'code':
                  msg = self.root[0].text
                  if msg.startswith('Statement generation in progress'):
                      _logger.info('still working...')
                      continue
                  else:
                      raise FlexError(msg)
              break
          _logger.info('Statement retrieved.')