docs: def encode_exception(exception):
      """Encode exception to a form that can be passed around and serialized.
  
      This will grab the stack, then strip off the last two calls which are
      encode_exception and the function that called it.
      """
      import sys
      return AsyncException(unicode(exception),
                            exception.args,
                            sys.exc_info(),
                            exception)