docs: public static <U extends Aggregate> List<Batch<U>> getBatches(List<U> list, int partitionSize) {
          DataType c = null;
          for (val u:list) {
              for (val a:u.getArguments()) {
                  // we'll be comparing to the first array
                  if (c == null && a != null)
                      c = a.dataType();
  
                  if (a != null && c != null)
                      Preconditions.checkArgument(c == a.dataType(), "All arguments must have same data type");
              }
          }
  
          if (c == null)
              throw new ND4JIllegalStateException("Can't infer data type from arguments");
  
          List<List<U>> partitions = Lists.partition(list, partitionSize);
          List<Batch<U>> split = new ArrayList<>();
  
          for (List<U> partition : partitions) {
              split.add(new Batch<U>(partition));
          }
  
          return split;
      }