code: def obtain_token(self):
          
          token_end_points = ('token/obtain',
                              'obtain-token',
                              'obtain_token')
          for end_point in token_end_points:
              try:
                  return self.auth[end_point]._(page_size=None)['token']
              except BeanBagException as e:
                  if e.response.status_code != 404:
                      raise
          raise Exception('Could not obtain token from any known URL.')
docs: Try to obtain token from all end-points that were ever used to serve the
          token. If the request returns 404 NOT FOUND, retry with older version of
          the URL.