code: def _copy_and_setup_react_ui(dest_dir: Optional[str] = None) -> None:
      logger.info("⚡ setting up react-ui template")
      path = os.path.dirname(os.path.abspath(__file__))
      template_dir = os.path.join(path, "react-ui-template")
  
      if dest_dir is None:
          dest_dir = os.path.join(os.getcwd(), "react-ui")
  
      shutil.copytree(template_dir, dest_dir)
  
      logger.info("⚡ install react project deps")
      ui_path = os.path.join(dest_dir, "ui")
      subprocess.run(f"cd {ui_path} && yarn install", shell=True)
  
      logger.info("⚡ building react project")
      subprocess.run(f"cd {ui_path} && yarn build", shell=True)
  
      m = f"""
      ⚡⚡ react-ui created! ⚡⚡
  
      ⚡ Connect it to your component using `configure_layout`:
  
      # Use a LightningFlow or LightningWork
      class YourComponent(la.LightningFlow):
          def configure_layout(self):
              return la.frontend.StaticWebFrontend(Path(__file__).parent / "react-ui/src/dist")
  
      ⚡ run the example_app.py to see it live!
      lightning run app {dest_dir}/example_app.py
  
      """
      logger.info(m)
  
file_path: pytorch-lightning/src/lightning/app/cli/cmd_react_ui_init.py
imports: import os
  import re
  import shutil
  import subprocess
  from typing import Optional
  from lightning.app.utilities.app_helpers import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: _copy_and_setup_react_ui(dest_dir) without return types