keras/src/models/functional.py/Functional/layers
class Functional:    def layers(self):
        layers = []
        for operation in self._operations:
            if isinstance(operation, Layer):
                layers.append(operation)
        return layers