code: def test_write_sql(temp_database: str):
      connection = sqlite3.connect(temp_database)
      connection.cursor().execute("CREATE TABLE test(string, number)")
      dataset = ray.data.from_items(
          [
              {"string": "spam", "number": 0},
              {"string": "ham", "number": 1},
          ]
      )
  
      dataset.write_sql(
          "INSERT INTO test VALUES(?, ?)",
          lambda: sqlite3.connect(temp_database),
      )
  
      result = connection.cursor().execute(
          "SELECT * FROM test ORDER BY number"
      )
      assert result.fetchall() == [("spam", 0), ("ham", 1)]
  
imports: import os
  import re
  import sqlite3
  import tempfile
  import uuid
  from collections import namedtuple
  from contextlib import contextmanager
  from typing import Generator
  from unittest import mock
  import pandas
  import pyarrow
  import pytest
  import ray
  import ray.cloudpickle
label_desc: Use image node_id 3 for calling a global function with example usage: test_write_sql(temp_database) without return types