code: def _session(self, domain, domain_id=None, get_zone=True):
          
          name, link = self._link_record()
          qdomain, nameservers, cname = Provider._get_dns_cname(
              (name if name else domain + '.'), link)
          qdomain_id, zone = domain_id, None
          self.session = self._auth_session(self.username, self.password)
          try:
              if not domain_id or qdomain != domain:
                  qdomain_id = self._get_domain_id(qdomain)
              if qdomain == domain:
                  self.domain_id = qdomain_id
              if get_zone:
                  zone = self._get_zone(qdomain, qdomain_id)
              yield {'nameservers': nameservers, 'zone': zone, 'cname': cname}
          except Exception as exc:
              raise exc
          finally:
              self._exit_session()
docs: Generates, authenticates and exits session to Hetzner account, and
          provides tuple of additional needed domain data (domain nameservers,
          zone and linked record name) to public methods. The tuple parameters
          are empty if not existent or specified. Exits session and raises error
          if provider fails during session.