code: public static Map<Object, Map> groupBy(Map self, List<Closure> closures) {
          return groupBy(self, closures.toArray());
      }
docs: Groups the members of a map into sub maps determined by the supplied
  mapping closures. Each closure will be passed a Map.Entry or key and
  value (depending on the number of parameters the closure accepts) and
  should return the key that each item should be grouped under. The
  resulting map will have an entry for each 'group path' returned by all
  closures, with values being the map members from the original map that
  belong to each such 'group path'.
  
  If the <code>self</code> map is one of TreeMap, Hashtable, or Properties,
  the returned Map will preserve that type, otherwise a LinkedHashMap will
  be returned.
  
  <pre class="groovyTestCase">def result = [a:1,b:2,c:3,d:4,e:5,f:6].groupBy([{ it.value % 2 }, { it.key.next() }])
  assert result == [1:[b:[a:1], d:[c:3], f:[e:5]], 0:[c:[b:2], e:[d:4], g:[f:6]]]</pre>
  If an empty list of closures is supplied the IDENTITY Closure will be used.
  
  @param self     a map to group
  @param closures a list of closures that map entries on keys
  @return a new map grouped by keys on each criterion
  @since 1.8.1
  @see Closure#IDENTITY