@Nullable
  public static QualifiedName asQualifiedName(@NotNull PyAstQualifiedExpression expr) {
    final List<String> path = new LinkedList<>();
    final String firstName = expr.getReferencedName();
    if (firstName == null) {
      return null;
    }
    path.add(firstName);
    PyAstExpression qualifier = expr.getQualifier();
    while (qualifier != null) {
      final PyAstReferenceExpression qualifierReference = ObjectUtils.tryCast(qualifier, PyAstReferenceExpression.class);
      if (qualifierReference == null) {
        return null;
      }
      final String qualifierName = qualifierReference.getReferencedName();
      if (qualifierName == null) {
        return null;
      }
      path.add(0, qualifierName);
      qualifier = qualifierReference.getQualifier();
    }
    return QualifiedName.fromComponents(path);
  }
@Nullable
  public static QualifiedName asQualifiedName(@NotNull PyAstQualifiedExpression expr)