String (@NotNull final PyReferenceExpression currentValue, @NotNull final PyClass dequalifyIfDeclaredInClass) { final PyExpression qualifier = currentValue.getQualifier(); if ((qualifier instanceof PyReferenceExpression) && ((PyReferenceExpression)qualifier).getReference().isReferenceTo(dequalifyIfDeclaredInClass)) { final String name = currentValue.getName(); return ((name != null) ? name : currentValue.getText()); } return currentValue.getText(); }