code: def get_logout_url(self, redirect_url=None):
          
          url = urllib_parse.urljoin(self.server_url, 'logout')
          if redirect_url:
              params = {self.logout_redirect_param_name: redirect_url}
              url += '?' + urllib_parse.urlencode(params)
          return url
docs: Generates CAS logout URL