code: def raise_with_traceback(exception, message="", *args, **kwargs):
      # type: (Callable, str, Any, Any) -> None
      
      exc_type, exc_value, exc_traceback = sys.exc_info()
      # If not called inside a "except", exc_type will be None. Assume it will not happen
      exc_msg = "{}, {}: {}".format(message, exc_type.__name__, exc_value)  # type: ignore
      error = exception(exc_msg, *args, **kwargs)
      try:
          raise error.with_traceback(exc_traceback)
      except AttributeError:
          error.__traceback__ = exc_traceback
          raise error
docs: Raise exception with a specified traceback.
  
      This MUST be called inside a "except" clause.
  
      :param Exception exception: Error type to be raised.
      :param str message: Message to include with error, empty by default.
      :param args: Any additional args to be included with exception.