class_docstr: The `PanelFrontend` enables you to serve Panel code as a Frontend for your LightningFlow.
  
  Reference: https://lightning.ai/lightning-docs/workflows/add_web_ui/panel/
  
  Args:
      entry_point: The path to a .py or .ipynb file, or a pure function. The file or function must contain your Panel
          code. The function can optionally accept an ``AppStateWatcher`` argument.
  
  Raises:
      TypeError: Raised if the ``entry_point`` provided is a class method
  
  Example:
  
  To use the `PanelFrontend`, you must first install the `panel` package:
  
  .. code-block:: bash
  
      pip install panel
  
  Create the files `panel_app_basic.py` and `app_basic.py` with the content below.
  
  **panel_app_basic.py**
  
  .. code-block:: python
  
      import panel as pn
  
      pn.panel("Hello **Panel ⚡** World").servable()
  
  **app_basic.py**
  
  .. code-block:: python
  
      from lightning.app import LightningFlow, LightningApp
      from lightning.app.frontend.panel import PanelFrontend
  
  
      class LitPanel(LightningFlow):
          def configure_layout(self):
              return PanelFrontend("panel_app_basic.py")
  
  
      class LitApp(LightningFlow):
          def __init__(self):
              super().__init__()
              self.lit_panel = LitPanel()
  
          def configure_layout(self):
              return {"name": "home", "content": self.lit_panel}
  
  
      app = LightningApp(LitApp())
  
  Start the Lightning server with `lightning run app app_basic.py`.
  
  For development you can get Panel autoreload by setting the ``PANEL_AUTORELOAD``
  environment variable to 'yes', i.e. run
  ``PANEL_AUTORELOAD=yes lightning run app app_basic.py``
code: def __init__(self, entry_point: str | Callable):
      super().__init__()
  
      if inspect.ismethod(entry_point):
          raise TypeError(
              "The `PanelFrontend` doesn't support `entry_point` being a method. Please, use a pure function."
          )
  
      self.entry_point = entry_point
      self._process: None | subprocess.Popen = None
      self._log_files: dict[str, TextIO] = {}
      _logger.debug(
          "PanelFrontend Frontend with %s is initialized.", entry_point
      )
  
imports: from __future__ import annotations
  import inspect
  import os
  import pathlib
  import subprocess
  import sys
  from typing import Callable, TextIO
  from lightning.app.frontend.frontend import Frontend
  from lightning.app.frontend.utils import _get_frontend_environment
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.cloud import is_running_in_cloud
  from lightning.app.utilities.imports import requires
  from lightning.app.utilities.log import get_logfile
label_desc: Use image node_id 1 to create a new PanelFrontend object from inherited base classes: Frontend with example: obj = PanelFrontend(entry_point)