code: def test_notebookdatabase(tmp_directory):
      for i, params in enumerate(
          [
              dict(number=1, list_=[1, 2, 3]),
              dict(number=2, list_=[3, 2, 1]),
          ]
      ):
          save_notebook(nb, f"nb-{i}.ipynb", parameters=params)
  
      db = NotebookDatabase("nb.db", "*.ipynb")
      db.index()
  
      out = db.query(
          """
  SELECT
      path,
      json_extract(c, '$.number') AS number,
      json_extract(c, '$.list') AS list
  FROM nbs
  ORDER BY 2 ASC
  """
      )
  
      assert out.to_dict() == {
          "path": {0: "nb-0.ipynb", 1: "nb-1.ipynb"},
          "number": {0: 1, 1: 2},
          "list": {0: "[1,2,3]", 1: "[3,2,1]"},
      }
  
      save_notebook(
          nb, "nb-2.ipynb", parameters=dict(number=3, list_=[1, 1, 1])
      )
  
      db.index()
  
      out = db.query(
          """
  SELECT
      path,
      json_extract(c, '$.number') AS number,
      json_extract(c, '$.list') AS list
  FROM nbs
  ORDER BY 2 ASC
  """
      )
  
      assert out.to_dict() == {
          "path": {0: "nb-0.ipynb", 1: "nb-1.ipynb", 2: "nb-2.ipynb"},
          "number": {0: 1, 1: 2, 2: 3},
          "list": {0: "[1,2,3]", 1: "[3,2,1]", 2: "[1,1,1]"},
      }
  
file_path: sklearn-evaluation/tests/nb/test_NotebookDatabase.py
imports: from pathlib import Path
  import pytest
  from sklearn_evaluation import NotebookDatabase
  from conftest import save_notebook
label_desc: Use image node_id 1 for calling a global function with example usage: test_notebookdatabase(tmp_directory) without return types