void () { // resolve to the first overload myFixture .copyDirectoryToProject("resolve/OverloadsAndNoImplementationInImportedClassDep", "OverloadsAndNoImplementationInImportedClassDep"); final PyFunction foo = assertResolvesTo(PyFunction.class, "foo"); final TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), myFixture.getFile()); PyiUtil .getOverloads(foo, context) .forEach( overload -> { if (overload != foo) assertTrue(PyPsiUtils.isBefore(foo, overload)); } ); }