def all_segs_matching_fts(self, fts):
        """Return segments matching a feature mask, both as (value, feature)
        tuples (sorted in reverse order by length).

        Args:
            fts (list): feature mask as (value, feature) tuples.

        Returns:
            list: segments matching `fts`, sorted in reverse order by length
        """
        matching_segs = []
        for seg, pairs in self.segments:
            if set(fts) <= set(pairs):
                matching_segs.append(seg)
        return sorted(matching_segs, key=lambda x: len(x), reverse=True)