void (@NotNull String referencedName, @NotNull ResolveResultList ret, @NotNull PyQualifiedExpression element) { final Project project = element.getProject(); final GlobalSearchScope scope = PySearchUtilBase.excludeSdkTestsScope(project); final Collection<PyFunction> functions = PyFunctionNameIndex.find(referencedName, project, scope); final PsiFile containingFile = element.getContainingFile(); final List<QualifiedName> imports; if (containingFile instanceof PyFile) { imports = collectImports((PyFile)containingFile); } else { imports = Collections.emptyList(); } for (PyFunction function : functions) { if (function.getContainingClass() != null) { ret.add(new ImplicitResolveResult(function, getImplicitResultRate(function, imports, element))); } } PyClassAttributesIndex .findClassAndInstanceAttributes(referencedName, project, scope) .forEach(attribute -> ret.add(new ImplicitResolveResult(attribute, getImplicitResultRate(attribute, imports, element)))); }