code: def test_canned_query_permissions_on_database_page(
      canned_write_client,
  ):
      # Without auth only shows three queries
      query_names = {
          q["name"]
          for q in canned_write_client.get("/data.json").json["queries"]
      }
      assert query_names == {
          "add_name_specify_id_with_error_in_on_success_message_sql",
          "from_hook",
          "update_name",
          "add_name_specify_id",
          "from_async_hook",
          "canned_read",
          "add_name",
      }
  
      # With auth shows four
      response = canned_write_client.get(
          "/data.json",
          cookies={
              "ds_actor": canned_write_client.actor_cookie(
                  {"id": "root"}
              )
          },
      )
      assert response.status == 200
      query_names_and_private = sorted(
          [
              {"name": q["name"], "private": q["private"]}
              for q in response.json["queries"]
          ],
          key=lambda q: q["name"],
      )
      assert query_names_and_private == [
          {"name": "add_name", "private": False},
          {"name": "add_name_specify_id", "private": False},
          {
              "name": "add_name_specify_id_with_error_in_on_success_message_sql",
              "private": False,
          },
          {"name": "canned_read", "private": False},
          {"name": "delete_name", "private": True},
          {"name": "from_async_hook", "private": False},
          {"name": "from_hook", "private": False},
          {"name": "update_name", "private": False},
      ]
  
imports: from bs4 import BeautifulSoup
  import json
  import pytest
  import re
  from .fixtures import make_app_client, app_client
label_desc: Use image node_id 15 for calling a global function with example usage: test_canned_query_permissions_on_database_page(canned_write_client) without return types