docs: def _get_kind(self, limit):
          """ Get a set of dominant file types. The files must contribute
              at least C{limit}% to the item's total size.
          """
          histo = self.fetch("custom_kind")
  
          if histo:
              # Parse histogram from cached field
              histo = [i.split("%_") for i in str(histo).split()]
              histo = [(int(val, 10), ext) for val, ext in histo]
              ##self._engine.LOG.debug("~~~~~~~~~~ cached histo = %r" % histo)
          else:
              # Get filetypes
              histo = traits.get_filetypes(self.fetch("files"),
                  path=operator.attrgetter("path"), size=operator.attrgetter("size"))
  
              # Set custom cache field with value formatted like "80%_flac 20%_jpg" (sorted by percentage)
              histo_str = ' '.join(("%d%%_%s" % i).replace(' ', '_') for i in histo)
              self._make_it_so("setting kind cache %r on" % (histo_str,), ["custom.set"], "kind", histo_str)
              self._fields["custom_kind"] = histo_str
  
          # Return all non-empty extensions that make up at least <limit>% of total size
          return set(ext for val, ext in histo if ext and val >= limit)