code: def test_inin009_invalid_index_string(dash_duo):
      app = Dash()
  
      def will_raise():
          app.index_string = """<!DOCTYPE html>
          <html>
              <head>
                  {%metas%}
                  <title>{%title%}</title>
                  {%favicon%}
                  {%css%}
              </head>
              <body>
                  <div id="custom-header">My custom header</div>
                  <div id="add"></div>
                  <footer>
                  </footer>
              </body>
          </html>"""
  
      with pytest.raises(Exception) as err:
          will_raise()
  
      exc_msg = str(err.value)
      assert "{%app_entry%}" in exc_msg
      assert "{%config%}" in exc_msg
      assert "{%scripts%}" in exc_msg
  
      app.layout = html.Div("Hello World", id="a")
  
      dash_duo.start_server(app)
      assert dash_duo.find_element("#a").text == "Hello World"
  
imports: import datetime
  import flask
  import json
  import pytest
  import re
  from bs4 import BeautifulSoup
  import dash_dangerously_set_inner_html
  import dash_flow_example
  import dash
  from dash import Dash, html, dcc, Input, Output
  from dash.exceptions import PreventUpdate
  from dash.testing.wait import until
label_desc: Use image node_id 7 for calling a global function with example usage: test_inin009_invalid_index_string(dash_duo) without return types