def _write_cell_styles(self):
        """ write styles combinations based on ids found in tables """
        # writing the cellXfs
        cell_xfs = SubElement(self._root, 'cellXfs',
                              count='%d' % len(self.wb._cell_styles))

        for style in self.wb._cell_styles:

            node = style.to_tree()
            cell_xfs.append(node)

            if style.applyAlignment:
                al = self.wb._alignments[style.alignmentId]
                el = al.to_tree()
                node.append(el)

            if style.applyProtection:
                prot = self.wb._protections[style.protectionId]
                el = prot.to_tree()
                node.append(el)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/writer/styles.py/StyleWriter._write_cell_styles/original