code: def download_frontend(root: str = _PROJECT_ROOT):
      """Downloads an archive file for a specific release of the Lightning frontend and extracts it to the correct
      directory."""
      build_dir = "build"
      frontend_dir = pathlib.Path(FRONTEND_DIR)
      download_dir = tempfile.mkdtemp()
  
      shutil.rmtree(frontend_dir, ignore_errors=True)
  
      response = urllib.request.urlopen(
          LIGHTNING_FRONTEND_RELEASE_URL
      )  # noqa: S310
  
      file = tarfile.open(fileobj=response, mode="r|gz")
      file.extractall(path=download_dir)  # noqa: S202
  
      shutil.move(os.path.join(download_dir, build_dir), frontend_dir)
      print("The Lightning UI has successfully been downloaded!")
  
imports: import functools
  import logging
  import os
  import pathlib
  import shutil
  import subprocess
  import sys
  import tarfile
  import tempfile
  import urllib.request
  from pathlib import Path
  from typing import Any, Callable, Optional
  from packaging.version import Version
  from lightning.app import _PROJECT_ROOT, _logger, _root_logger
  from lightning.app import __version__
  from lightning.app.core.constants import FRONTEND_DIR, PACKAGE_LIGHTNING
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.git import check_github_repository, get_dir_name
label_desc: Use image node_id 1 for calling a global function with example usage: download_frontend(root) without return types