class_docstr: A ``_RootFlow`` which takes a work class rather than the work itself.
class_docstr_tok: ["A","``","_RootFlow","``","which","takes","a","work","class","rather","than","the","work","itself","."]
code: def __init__(self, work):
      super().__init__(work())
  
imports: from functools import partial
  from unittest import mock
  import pytest
  from lightning.app import LightningApp, LightningFlow, LightningWork
  from lightning.app.core.flow import _RootFlow
  from lightning.app.frontend import StaticWebFrontend
  from lightning.app.utilities.app_helpers import AppStatePlugin, BaseStatePlugin, InMemoryStateStore, StateStore, _is_headless, _MagicMockJsonSerializable, is_overridden, is_static_method
  from lightning.app.utilities.exceptions import LightningAppStateException
label_desc: Use image node_id 1 to create a new WorkClassRootFlow object from inherited base classes: _RootFlow with example: obj = WorkClassRootFlow(work)