docstr: Method to set the state to this LightningFlow, its children and
  :class:`~lightning.app.core.work.LightningWork`.
  
  Arguments:
      provided_state: The state to be reloaded
      recurse: Whether to apply the state down children.
docstr_tok: ["Method","to","set","the","state","to","this","LightningFlow",",","its","children","and",":","class",":","`","~lightning.app.core.work.LightningWork","`",".","Arguments",":","provided_state",":","The","state","to","be","reloaded","recurse",":","Whether","to","apply","the","state","down","children","."]
code: def set_state(
      self, provided_state: Dict, recurse: bool = True
  ) -> None:
      """Method to set the state to this LightningFlow, its children and
      :class:`~lightning.app.core.work.LightningWork`.
  
      Arguments:
          provided_state: The state to be reloaded
          recurse: Whether to apply the state down children.
  
      """
      for k, v in provided_state["vars"].items():
          if isinstance(v, Dict):
              v = _maybe_create_drive(self.name, v)
          if isinstance(v, Dict):
              v = _maybe_create_cloud_compute(v)
          setattr(self, k, v)
      self._changes = provided_state["changes"]
      self._calls.update(provided_state["calls"])
  
      if not recurse:
          return
  
      for child, state in provided_state["flows"].items():
          getattr(self, child).set_state(state)
      for work, state in provided_state["works"].items():
          getattr(self, work).set_state(state)
      for structure, state in provided_state["structures"].items():
          getattr(self, structure).set_state(state)
  
imports: import inspect
  import warnings
  from copy import deepcopy
  from datetime import datetime
  from types import FrameType
  from typing import TYPE_CHECKING, Any, Dict, Generator, Iterable, List, Optional, Tuple, Union, cast
  from deepdiff import DeepHash
  from lightning.app.core.work import LightningWork
  from lightning.app.frontend import Frontend
  from lightning.app.storage.drive import Drive, _maybe_create_drive
  from lightning.app.storage.path import Path
  from lightning.app.utilities.app_helpers import _is_json_serializable, _LightningAppRef, _set_child_name, is_overridden
  from lightning.app.utilities.component import _sanitize_state
  from lightning.app.utilities.exceptions import ExitAppException, LightningFlowException
  from lightning.app.utilities.introspection import _is_init_context, _is_run_context
  from lightning.app.utilities.packaging.cloud_compute import CloudCompute, _maybe_create_cloud_compute
label_desc: Use image node_id 16 for calling the LightningFlow obj's underlying member method code with example usage: obj.set_state(provided_state, recurse) without return types