code: def test_crossdb_warning_if_too_many_databases(tmp_path_factory):
      db_dir = tmp_path_factory.mktemp("dbs")
      dbs = []
      for i in range(11):
          path = str(db_dir / "db_{}.db".format(i))
          conn = sqlite3.connect(path)
          conn.execute("vacuum")
          dbs.append(path)
      runner = CliRunner(mix_stderr=False)
      result = runner.invoke(
          cli,
          [
              "serve",
              "--crossdb",
              "--get",
              "/",
          ]
          + dbs,
          catch_exceptions=False,
      )
      assert (
          "Warning: --crossdb only works with the first 10 attached databases"
          in result.stderr
      )
  
file_path: datasette/tests/test_crossdb.py
imports: from datasette.cli import cli
  from click.testing import CliRunner
  import urllib
  import sqlite3
  from .fixtures import app_client_two_attached_databases_crossdb_enabled
label_desc: Use image node_id 2 for calling a global function with example usage: test_crossdb_warning_if_too_many_databases(tmp_path_factory) without return types