code: def _auth_session(self, username, password):
          
          api = self.api[self.account]['auth']
          endpoint = api.get('endpoint', self.api[self.account]['endpoint'])
          session = requests.Session()
          session_retries = Retry(total=10, backoff_factor=0.5)
          session_adapter = requests.adapters.HTTPAdapter(max_retries=session_retries)
          session.mount('https://', session_adapter)
          response = session.request('GET', endpoint + api['GET'].get('url', '/'))
          dom = Provider._filter_dom(response.text, api['filter'])
          data = Provider._extract_hidden_data(dom)
          data[api['user']], data[api['pass']] = username, password
          response = session.request('POST', endpoint + api['POST']['url'], data=data)
          if Provider._filter_dom(response.text, api['filter']):
              LOGGER.error('Hetzner => Unable to authenticate session with %s account \'%s\': '
                           'Invalid credentials',
                           self.account, username)
              raise AssertionError
          LOGGER.info('Hetzner => Authenticate session with %s account \'%s\'',
                      self.account, username)
          return session
docs: Creates session to Hetzner account, authenticates with given credentials and
          returns the session, if authentication was successful. Otherwise raises error.