List<List<PsiComment>> (@NotNull String text) { PyFile file = assertInstanceOf(myFixture.configureByText("a.py", text), PyFile.class); PyFunction func = file.findTopLevelFunction("func"); return PyPsiUtils.getPrecedingCommentBlocks(func); }