code: public static Filter[][] filters(Query query) {
          List<List<Filter>> paths = new ArrayList<>();
          List<Filter[]> workingPath = new ArrayList<>();
  
          addPathsToLeaves(query, workingPath, paths);
  
          Filter[][] ret = new Filter[paths.size()][];
          Arrays.setAll(ret, (i) -> paths.get(i).toArray(new Filter[paths.get(i).size()]));
          return ret;
      }
docs: Converts the provided filter tree to a list of paths (array of filters). Each of the paths in the result
  represent 1 branch from the tree from root to some leaf.
  
  @param query the tree of filters
  @return the list of paths