code: def catch_and_return_token(func, self, *args, **kwargs):
      
  
      try:
          return func(self, *args, **kwargs)
      except GSSError as e:
          if e.token is not None and self.__DEFER_STEP_ERRORS__:
              self._last_err = e
              # skip the "return func" line above in the traceback
              if six.PY2:
                  self._last_tb = sys.exc_info()[2].tb_next.tb_next
              else:
                  self._last_err.__traceback__ = e.__traceback__.tb_next
  
              return e.token
          else:
              raise
docs: Optionally defer exceptions and return a token instead
  
      When `__DEFER_STEP_ERRORS__` is set on the implementing class
      or instance, methods wrapped with this wrapper will
      catch and save their :python:`GSSError` exceptions and
      instead return the result token attached to the exception.
  
      The exception can be later retrived through :python:`_last_err`
      (and :python:`_last_tb` when Python 2 is in use).