code: def test_base_url_config(
      app_client_base_url_prefix, path, use_prefix
  ):
      client = app_client_base_url_prefix
      path_to_get = path
      if use_prefix:
          path_to_get = "/prefix/" + path.lstrip("/")
      response = client.get(path_to_get)
      soup = Soup(response.content, "html.parser")
      for form in soup.select("form"):
          assert form["action"].startswith("/prefix")
      for el in soup.findAll(["a", "link", "script"]):
          if "href" in el.attrs:
              href = el["href"]
          elif "src" in el.attrs:
              href = el["src"]
          else:
              continue  # Could be a <script>...</script>
          if (
              not href.startswith("#")
              and href
              not in {
                  "https://datasette.io/",
                  "https://github.com/simonw/datasette",
                  "https://github.com/simonw/datasette/blob/main/LICENSE",
                  "https://github.com/simonw/datasette/blob/main/tests/fixtures.py",
                  "/login-as-root",  # Only used for the latest.datasette.io demo
              }
              and not href.startswith(
                  "https://plugin-example.datasette.io/"
              )
          ):
              # If this has been made absolute it may start http://localhost/
              if href.startswith("http://localhost/"):
                  href = href[len("http://localost/") :]
              assert href.startswith("/prefix/"), json.dumps(
                  {
                      "path": path,
                      "path_to_get": path_to_get,
                      "href_or_src": href,
                      "element_parent": str(el.parent),
                  },
                  indent=4,
                  default=repr,
              )
  
imports: from bs4 import BeautifulSoup
  from datasette.utils import allowed_pragmas
  from .fixtures import app_client, app_client_base_url_prefix, app_client_shorter_time_limit, app_client_two_attached_databases, make_app_client, METADATA
  from .utils import assert_footer_links, inner_html
  import copy
  import json
  import pathlib
  import pytest
  import re
  import urllib.parse
label_desc: Use image node_id 16 for calling a global function with example usage: test_base_url_config(app_client_base_url_prefix, path, use_prefix) without return types