docs: public static List<Relation<?>> getRelations(Result r) {
      if(r instanceof Relation<?>) {
        List<Relation<?>> anns = new ArrayList<>(1);
        anns.add((Relation<?>) r);
        return anns;
      }
      if(r instanceof HierarchicalResult) {
        return filterResults(((HierarchicalResult) r).getHierarchy(), r, Relation.class);
      }
      return Collections.emptyList();
    }