private static boolean outputUsedInLastStatement(PsiStatement[] range, PsiVariable output) {
        int outDecl = Arrays.asList(range).indexOf(output.getParent());
        return outDecl >= range.length - 1 || VariableAccessUtils.variableIsUsed(output, range[range.length - 1]);
      }
private static boolean outputUsedInLastStatement(PsiStatement[] range, PsiVariable output)