code: def _get_domain_id(self, domain):
          
          api = self.api[self.account]['domain_id']
          qdomain = dns.name.from_text(domain).to_unicode(True)
          domains, last_count, page = {}, -1, 0
          while last_count != len(domains):
              last_count = len(domains)
              page += 1
              url = (api['GET'].copy()).get('url', '/').replace('<index>', str(page))
              params = api['GET'].get('params', {}).copy()
              for param in params:
                  params[param] = params[param].replace('<index>', str(page))
              response = self._get(url, query_params=params)
              domain_tags = Provider._filter_dom(response.text, api['filter'], True)
              for domain_tag in domain_tags:
                  domain_id = Provider._extract_domain_id(dict(domain_tag.attrs)[api['id']['attr']],
                                                          api['id']['regex'])
                  domain = (Provider._filter_dom(domain_tag, api['domain'])
                            .renderContents().decode('UTF-8'))
                  domains[domain] = domain_id
                  if domain == qdomain:
                      LOGGER.info('Hetzner => Get ID %s for domain %s', domain_id, qdomain)
                      return domain_id
          LOGGER.error('Hetzner => ID for domain %s does not exists', qdomain)
          raise AssertionError
docs: Pulls all domains managed by authenticated Hetzner account, extracts their IDs
          and returns the ID for the current domain, if exists. Otherwise raises error.