boolean (@NotNull final PyImportStatementBase importStatementBase) { if (importStatementBase instanceof PyFromImportStatement) { final QualifiedName qName = ((PyFromImportStatement)importStatementBase).getImportSourceQName(); if (qName != null && qName.matches("gi", "repository")) { return true; } } return false; }