code: def test_table_and_query(ds, base_url, name, format, expected):
      ds._settings["base_url"] = base_url
      actual1 = ds.urls.table("_memory", name, format=format)
      assert actual1 == expected
      assert isinstance(actual1, PrefixedUrlString)
      actual2 = ds.urls.query("_memory", name, format=format)
      assert actual2 == expected
      assert isinstance(actual2, PrefixedUrlString)
  
file_path: datasette/tests/test_internals_urls.py
imports: from datasette.app import Datasette
  from datasette.utils import PrefixedUrlString
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_table_and_query(ds, base_url, name, format, expected) without return types