code: def test_serve_duplicate_database_names(tmpdir):
      "'datasette db.db nested/db.db' should attach two databases, /db and /db_2"
      runner = CliRunner()
      db_1_path = str(tmpdir / "db.db")
      nested = tmpdir / "nested"
      nested.mkdir()
      db_2_path = str(tmpdir / "nested" / "db.db")
      for path in (db_1_path, db_2_path):
          sqlite3.connect(path).execute("vacuum")
      result = runner.invoke(
          cli, [db_1_path, db_2_path, "--get", "/-/databases.json"]
      )
      assert result.exit_code == 0, result.output
      databases = json.loads(result.output)
      assert {db["name"] for db in databases} == {"db", "db_2"}
  
imports: from .fixtures import app_client, make_app_client, TestClient, EXPECTED_PLUGINS
  import asyncio
  from datasette.app import SETTINGS
  from datasette.plugins import DEFAULT_PLUGINS
  from datasette.cli import cli, serve
  from datasette.version import __version__
  from datasette.utils import tilde_encode
  from datasette.utils.sqlite import sqlite3
  from click.testing import CliRunner
  import io
  import json
  import pathlib
  import pytest
  import sys
  import textwrap
  from unittest import mock
  import urllib
label_desc: Use image node_id 22 for calling a global function with example usage: test_serve_duplicate_database_names(tmpdir) without return types