code: def javascript_html():
      # Ensure localization is in `window` before scripts
      head = f'<script type="text/javascript">{localization.localization_js(shared.opts.localization)}</script>\n'
  
      script_js = os.path.join(script_path, "script.js")
      head += f'<script type="text/javascript" src="{webpath(script_js)}"></script>\n'
  
      for script in scripts.list_scripts("javascript", ".js"):
          head += f'<script type="text/javascript" src="{webpath(script.path)}"></script>\n'
  
      for script in scripts.list_scripts("javascript", ".mjs"):
          head += f'<script type="module" src="{webpath(script.path)}"></script>\n'
  
      if shared.cmd_opts.theme:
          head += f'<script type="text/javascript">set_theme("{shared.cmd_opts.theme}");</script>\n'
  
      return head
  
file_path: stable-diffusion-webui/modules/ui_gradio_extensions.py
imports: import os
  import gradio
  from modules import localization, shared, scripts
  from modules.paths import script_path, data_path, cwd
label_desc: Use image node_id 2 for calling a global function with example usage: javascript_html() and returns: head