private static @NotNull IntentionState createAndCheckState(@NotNull PyReferenceExpression refExpr) {
    IntentionState state = createState(refExpr);
    if (state == null || !state.isAvailable()) {
      throw new IllegalStateException();
    }
    return state;
  }
private static @NotNull IntentionState createAndCheckState(@NotNull PyReferenceExpression refExpr)