@classmethod
    def styles(cls, item):
        """ Get the :class:`Style` objects which apply to an item.

        Parameters
        ----------
        item : :class:`Stylable`
            The stylable item of interest.

        Returns
        -------
        result : tuple
            The :class:`Style` objects which apply to the item, in
            order of ascending precedence.

        """
        cache = cls._item_styles
        if item in cache:
            return cache[item]
        styles = []
        for sheet in cls.style_sheets(item):
            matches = []
            for style in sheet.styles():
                specificity = style.match(item)
                if specificity >= 0:
                    matches.append((specificity, len(matches), style))
            if matches:
                matches.sort()
                styles.extend(style for _1, _2, style in matches)
        style_items = cls._style_items
        for style in styles:
            style_items[style].add(item)
        styles = cache[item] = tuple(styles)
        return styles
dataset/ETHPy150Open nucleic/enaml/enaml/styling.py/StyleCache.styles/original