int () { final PyFromImportStatementStub stub = getStub(); if (stub != null) { return stub.getRelativeLevel(); } int result = 0; ASTNode seeker = getNode().getFirstChildNode(); while (seeker != null && (seeker.getElementType() == PyTokenTypes.FROM_KEYWORD || seeker.getElementType() == TokenType.WHITE_SPACE)) { seeker = seeker.getTreeNext(); } while (seeker != null && seeker.getElementType() == PyTokenTypes.DOT) { result++; seeker = seeker.getTreeNext(); } return result; }