code: public static BigDecimal average(EvaluationContext ctx, Object... args) {
          if (args.length == 0) {
              throw new RuntimeException("Wrong number of arguments");
          }
  
          return sum(ctx, args).divide(new BigDecimal(args.length));
      }
docs: Returns the average (arithmetic mean) of the arguments