code: def print_pretty_report(
      directory: pathlib.Path,
      ignore_patterns: Optional[List[str]] = None,
      help_texts: Optional[Dict[str, str]] = None,
  ) -> None:
      """Prints a report for the generated app."""
      tree = Tree(
          f":open_file_folder: [link file://{directory}]{directory}",
          guide_style="bold bright_blue",
      )
  
      help_texts = {} if help_texts is None else help_texts
  
      paths = sorted(
          directory.glob("*"),
          key=lambda p: (p.is_file(), p.name.lower()),
      )
      max_witdth = max(len(p.name) for p in paths)
  
      patterns_to_ignore = (
          [] if ignore_patterns is None else ignore_patterns
      )
      for path in paths:
          if any(
              re.match(pattern, path.name)
              for pattern in patterns_to_ignore
          ):
              # Only display relevant files
              continue
  
          help_text = help_texts.get(path.name, "")
          padding = " " * (max_witdth - len(path.name))
  
          text_pathname = Text(path.name, "green")
          text_pathname.highlight_regex(r"\..*$", "bold red")
          text_pathname.stylize(f"link file://{path}")
          text_pathname.append(f" {padding} {help_text}", "blue")
  
          icon = "📂 " if path.is_dir() else "📄 "
          icon = icon if _can_encode_icon(icon) else ""
  
          tree.add(Text(icon) + text_pathname)
  
      print("\n")
      print("Done. The app is ready here:\n")
      print(tree)
      print("\nRun it:\n")
      print(
          Panel(
              f"[red]lightning run app {directory.relative_to(Path.cwd()) / 'app.py'}"
          )
      )
  
imports: import pathlib
  import re
  import shutil
  import subprocess
  import sys
  import tarfile
  import urllib.request
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Any, Dict, List, Optional
  import click
  from jinja2 import Environment, FileSystemLoader
  from rich import print
  from rich.panel import Panel
  from rich.status import Status
  from rich.text import Text
  from rich.tree import Tree
  import lightning.app
label_desc: Use image node_id 4 for calling a global function with example usage: print_pretty_report(directory, ignore_patterns, help_texts) without return types