def get_layers(self):
        """
        Returns a set of layers in this cell.

        Returns
        -------
        out : set
            Set of the layers used in this cell.
        """
        layers = set()
        for element in self.elements:
            if isinstance(element, PolygonSet):
                layers.update(element.layers)
            elif isinstance(element, CellReference) or isinstance(
                    element, CellArray):
                layers.update(element.ref_cell.get_layers())
        for label in self.labels:
            layers.add(label.layer)
        return layers
def get_layers ( self ) : layers = set ( ) for element in self . elements : if isinstance ( element , PolygonSet ) : layers . update ( element . layers ) elif isinstance ( element , CellReference ) or isinstance ( element , CellArray ) : layers . update ( element . ref_cell . get_layers ( ) ) for label in self . labels : layers . add ( label . layer ) return layers
Returns a set of layers in this cell.

        Returns
        -------
        out : set
            Set of the layers used in this cell.