code: def create_temp_sqlite_db(test_db: str) -> None:
      Path(test_db).unlink(missing_ok=True)
  
      def convert_date(val: bytes) -> date:
          """Convert ISO 8601 date to datetime.date object."""
          return date.fromisoformat(val.decode())
  
      sqlite3.register_converter("date", convert_date)
  
      # NOTE: at the time of writing adcb/connectorx have weak SQLite support (poor or
      # no bool/date/datetime dtypes, for example) and there is a bug in connectorx that
      # causes float rounding < py 3.11, hence we are only testing/storing simple values
      # in this test db for now. as support improves, we can add/test additional dtypes).
  
      conn = sqlite3.connect(test_db)
      # ┌─────┬───────┬───────┬────────────┐
      # │ id  ┆ name  ┆ value ┆ date       │
      # │ --- ┆ ---   ┆ ---   ┆ ---        │
      # │ i64 ┆ str   ┆ f64   ┆ date       │
      # ╞═════╪═══════╪═══════╪════════════╡
      # │ 1   ┆ misc  ┆ 100.0 ┆ 2020-01-01 │
      # │ 2   ┆ other ┆ -99.0 ┆ 2021-12-31 │
      # └─────┴───────┴───────┴────────────┘
      conn.executescript(
          """
          CREATE TABLE test_data (
              id    INTEGER PRIMARY KEY,
              name  TEXT NOT NULL,
              value FLOAT,
              date  DATE
          );
          INSERT INTO test_data(name,value,date)
          VALUES ('misc',100.0,'2020-01-01'), ('other',-99.5,'2021-12-31');
          """
      )
      conn.close()
  
imports: from __future__ import annotations
  import os
  import sqlite3
  import sys
  from contextlib import suppress
  from datetime import date
  from pathlib import Path
  from types import GeneratorType
  from typing import TYPE_CHECKING, Any, NamedTuple
  import pytest
  from sqlalchemy import Integer, MetaData, Table, create_engine, func, select
  from sqlalchemy.sql.expression import cast
  import polars
  from polars.exceptions import UnsuitableSQLError
  from polars.io.database import _ARROW_DRIVER_REGISTRY_
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 2 for calling a global function with example usage: create_temp_sqlite_db(test_db) and returns: date