@Override
  @NotNull
  public PyFunctionStub createStub(@NotNull final PyFunction psi, final StubElement parentStub) {
    final PyFunctionImpl function = (PyFunctionImpl)psi;
    final String message = function.extractDeprecationMessage();
    final PyStringLiteralExpression docStringExpression = function.getDocStringExpression();
    final String typeComment = function.getTypeCommentAnnotation();
    final String annotationContent = function.getAnnotationValue();
    return new PyFunctionStubImpl(psi.getName(),
                                  PyPsiUtils.strValue(docStringExpression),
                                  message,
                                  function.isAsync(),
                                  function.isGenerator(),
                                  function.onlyRaisesNotImplementedError(),
                                  typeComment,
                                  annotationContent,
                                  parentStub,
                                  getStubElementType());
  }
@Override
  @NotNull
  public PyFunctionStub createStub(@NotNull final PyFunction psi, final StubElement parentStub)