void () { // resolve to the last implementation myFixture .copyDirectoryToProject("resolve/OverloadsAndImplementationsInImportedModuleDep", "OverloadsAndImplementationsInImportedModuleDep"); final PyFunction foo = assertResolvesTo(PyFunction.class, "foo"); final TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), myFixture.getFile()); assertFalse(PyiUtil.isOverload(foo, context)); ((PyFile)foo.getContainingFile()) .getTopLevelFunctions() .forEach( function -> assertTrue(PyiUtil.isOverload(function, context) || function == foo || PyPsiUtils.isBefore(function, foo)) ); }