def groupBy(groups_in, classifier, fun_desc='<STR_LIT:?>', keep_uniques=False,<EOL>*args, **kwargs):
groups, count, group_count = {}, <NUM_LIT:0>, len(groups_in)<EOL>for pos, paths in enumerate(groups_in.values()):<EOL><INDENT>out.write("<STR_LIT>"<EOL>"<STR_LIT>" % (<EOL>pos + <NUM_LIT:1>, group_count, fun_desc, count, len(paths)<EOL>))<EOL>for key, group in list(classifier(paths, *args, **kwargs).items()):<EOL><INDENT>groups.setdefault(key, set()).update(group)<EOL>count += len(group)<EOL><DEDENT><DEDENT>if not keep_uniques:<EOL><INDENT>groups = dict([(x, groups[x]) for x in groups if len(groups[x]) > <NUM_LIT:1>])<EOL><DEDENT>out.write("<STR_LIT>"<EOL>% (len(groups), fun_desc, count), newline=True)<EOL>return groups<EOL>
Subdivide groups of paths according to a function.

    :param groups_in: Grouped sets of paths.
    :type groups_in: :class:`~__builtins__.dict` of iterables

    :param classifier: Function to group a list of paths by some attribute.
    :type classifier: ``function(list, *args, **kwargs) -> str``

    :param fun_desc: Human-readable term for what the classifier operates on.
        (Used in log messages)
    :type fun_desc: :class:`~__builtins__.str`

    :param keep_uniques: If ``False``, discard groups with only one member.
    :type keep_uniques: :class:`~__builtins__.bool`


    :returns: A dict mapping classifier keys to groups of matches.
    :rtype: :class:`~__builtins__.dict`


    :attention: Grouping functions generally use a :class:`~__builtins__.set`
        ``groups`` as extra protection against accidentally counting a given
        file twice. (Complimentary to use of :func:`os.path.realpath` in
        :func:`~fastdupes.getPaths`)

    .. todo:: Find some way to bring back the file-by-file status text