void (@NotNull BiConsumer<? super PyType, ? super TypeEvalContext> typeFromAstChecker) { final PyFile file = getTestFile(); final PyTargetExpression attribute = file.findTopLevelAttribute("nt"); assertNotNull(attribute); final PyType typeFromStub = TypeEvalContext.codeInsightFallback(myFixture.getProject()).getType(attribute); assertNull(typeFromStub); assertNotParsed(file); final FileASTNode astNode = file.getNode(); assertNotNull(astNode); final TypeEvalContext context = TypeEvalContext.userInitiated(myFixture.getProject(), file); typeFromAstChecker.accept(context.getType(attribute), context); }