def METHOD_NAME(self):
    """Returns the state of its flows and works."""
    from lightning.app.core import LightningFlow, LightningWork
    return {
        "works": {key: item.METHOD_NAME for key, item in self.items() if isinstance(item, LightningWork)},
        "flows": {key: item.METHOD_NAME for key, item in self.items() if isinstance(item, LightningFlow)},
    }