docstr: Returns the state of its flows and works.
docstr_tok: ["Returns","the","state","of","its","flows","and","works","."]
code: def state(self):
      """Returns the state of its flows and works."""
      from lightning.app.core import LightningFlow, LightningWork
  
      return {
          "works": {
              key: item.state
              for key, item in self.items()
              if isinstance(item, LightningWork)
          },
          "flows": {
              key: item.state
              for key, item in self.items()
              if isinstance(item, LightningFlow)
          },
      }
  
file_path: pytorch-lightning/src/lightning/app/structures/dict.py
imports: import typing
  from lightning.app.utilities.app_helpers import _LightningAppRef, _set_child_name
label_desc: Use image node_id 6 for calling the Dict obj's underlying member method code with example usage: obj.state() and returns: dict