code: def get_app(path1="/", path2="/layout2"):
      app = Dash(__name__, use_pages=True)
  
      # test for storing arbitrary keyword arguments: An `id` prop is defined for every page
      # test for defining multiple pages within a single file: layout is passed directly to `register_page`
      # in the following two modules:
      dash.register_page(
          "multi_layout1",
          layout=html.Div(
              "text for multi_layout1", id="text_multi_layout1"
          ),
          path=path1,
          title="Supplied Title",
          description="This is the supplied description",
          name="Supplied name",
          image="birds.jpeg",
          id="multi_layout1",
      )
      dash.register_page(
          "multi_layout2",
          layout=html.Div(
              "text for multi_layout2", id="text_multi_layout2"
          ),
          path=path2,
          id="multi_layout2",
      )
  
      app.layout = html.Div(
          [
              html.Div(
                  [
                      html.Div(
                          dcc.Link(
                              f"{page['name']} - {page['path']}",
                              id=page["id"],
                              href=page["path"],
                          )
                      )
                      for page in dash.page_registry.values()
                  ]
              ),
              dash.page_container,
              dcc.Location(id="url", refresh=True),
          ]
      )
      return app
  
file_path: dash/tests/integration/multi_page/test_pages_layout.py
imports: import pytest
  import dash
  from dash import Dash, Input, State, dcc, html
  from dash.dash import _ID_LOCATION
  from dash.exceptions import NoLayoutException
label_desc: Use image node_id 1 for calling a global function with example usage: get_app(path1, path2) and returns: app