code: def test_notebook_database_update_true(tmp_directory):
      nb = """
  # + tags=["number"]
  print(42)
  """
      save_notebook(nb, "nb.ipynb")
  
      db = NotebookDatabase("nb.db", "*.ipynb")
      db.index()
  
      nb = """
  # + tags=["number"]
  print(43)
  """
      save_notebook(nb, "nb.ipynb")
  
      db.index(update=True)
  
      out = db.query(
          """
  SELECT
      path,
      json_extract(c, '$.number') AS number
  FROM nbs
  """
      )
  
      assert out.to_dict() == {
          "number": {0: 43},
          "path": {0: "nb.ipynb"},
      }
  
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 8 for calling a global function with example usage: test_notebook_database_update_true(tmp_directory) without return types