code: def _get_updated_content(
      original: str, root_path: str, info: AppInfo
  ) -> str:
      soup = BeautifulSoup(original, "html.parser")
  
      # replace favicon
      if info.favicon:
          soup.find("link", {"rel": "icon"}).attrs[
              "href"
          ] = info.favicon
  
      if info.title is not None:
          soup.find("title").string = info.title
  
      if info.description:
          soup.find("meta", {"name": "description"}).attrs[
              "content"
          ] = info.description
  
      if info.image:
          soup.find("meta", {"property": "og:image"}).attrs[
              "content"
          ] = info.image
  
      if info.meta_tags:
          for meta in info.meta_tags:
              soup.find("head").append(
                  BeautifulSoup(meta, "html.parser")
              )
  
      if root_path:
          # this will be used by lightning app ui to add root_path to add requests
          soup.find("head").append(
              BeautifulSoup(
                  f'<script>window.app_prefix="{root_path}"</script>',
                  "html.parser",
              )
          )
  
      return str(soup).replace("/static", f"{root_path}/static")
  
imports: from dataclasses import dataclass
  from typing import List, Optional
  from bs4 import BeautifulSoup
label_desc: Use image node_id 2 for calling a global function with example usage: _get_updated_content(original, root_path, info) and returns: str