void (@NotNull PyReferenceExpression target, boolean positive, boolean transformToDefinition, @NotNull Function<TypeEvalContext, PyType> suggestedType, @Nullable PyExpression typeElement) { final InstructionTypeCallback typeCallback = new InstructionTypeCallback() { @Override public Ref<PyType> getType(TypeEvalContext context, @Nullable PsiElement anchor) { return createAssertionType(context.getType(target), suggestedType.apply(context), positive, transformToDefinition, context, typeElement); } }; myStack.push(new Assertion(target, typeCallback)); }