<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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