'Generate triples of keys, duplicate counts, and constituent objects.'

def _duplicates(self, objs, keys, full, strict, tiebreak, merge):

    offset = (0 if full else 1)
    for (k, objs) in self._group_by(objs, keys, strict).items():
        if (len(objs) > 1):
            objs = self._order(objs, tiebreak)
            if merge:
                objs = self._merge(objs)
            (yield (k, (len(objs) - offset), objs[offset:]))
