int (PyElement target, List<QualifiedName> imports, PyQualifiedExpression element) { int rate = RatedResolveResult.RATE_LOW; if (target.getContainingFile() == element.getContainingFile()) { rate += 200; } else { final VirtualFile vFile = target.getContainingFile().getVirtualFile(); if (vFile != null) { if (ProjectScope.getProjectScope(element.getProject()).contains(vFile)) { rate += 80; } final QualifiedName qName = QualifiedNameFinder.findShortestImportableQName(element, vFile); if (qName != null && imports.contains(qName)) { rate += 70; } } } if (element.getParent() instanceof PyCallExpression) { if (target instanceof PyFunction) rate += 50; } else { if (!(target instanceof PyFunction)) rate += 50; } return rate; }