private static boolean voidPrefix(@NotNull PsiElement fragment, @NotNull PsiStatement @NotNull [] range, @NotNull PsiVariable output)
        throws PrepareFailedException {
        if (output.getParent() instanceof PsiDeclarationStatement statement) {
          int declarationIndex = Arrays.asList(range).indexOf(statement);
          if (declarationIndex > 0) {
            PsiStatement[] subRange = Arrays.copyOf(range, declarationIndex);
            ControlFlowWrapper subWrapper = new ControlFlowWrapper(fragment, subRange);
            subWrapper.prepareExitStatements(subRange);
            return subWrapper.getOutputVariables().length == 0;
          }
        }
        return false;
      }
private static boolean voidPrefix(@NotNull PsiElement fragment, @NotNull PsiStatement @NotNull [] range, @NotNull PsiVariable output)