@Contract("null -> null")
  private static @Nullable PsiVariable getVariable(PsiLoopStatement loop) {
    if (loop instanceof PsiForeachStatement foreachStatement) {
      return foreachStatement.getIterationParameter();
    }
    if (loop instanceof PsiForStatement forStatement) {
      CountingLoop countingLoop = CountingLoop.from(forStatement);
      if (countingLoop != null) {
        return countingLoop.getCounter();
      }
    }
    return null;
  }
@Contract("null -> null")
  private static @Nullable PsiVariable getVariable(PsiLoopStatement loop)