void () { Map<String, PsiElement> marks = loadTest(); PsiElement referenceElement = marks.get("<the_ref>"); final PyDocStringOwner docStringOwner = (PyDocStringOwner)((PyReferenceExpression)(referenceElement.getParent())).getReference().resolve(); checkByHTML(myProvider.generateDoc(docStringOwner, referenceElement)); }