void (@NotNull PyFromImportStatement node) { final PyReferenceExpression source = node.getImportSource(); if (source == null) return; final Set<String> dunderAlls = collectDunderAlls(source); if (dunderAlls == null) return; StreamEx .of(node.getImportElements()) .map(PyImportElement::getImportReferenceExpression) .nonNull() .filter( referenceExpression -> !dunderAlls.contains(referenceExpression.getName()) && !resolvesToFileSystemItem(referenceExpression) ) .forEach( referenceExpression -> { final String message = PyPsiBundle.message("INSP.protected.member.name.not.declared.in.all", referenceExpression.getName()); registerProblem(referenceExpression, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); } ); }