code: def test_work_database_periodic_store():
      id = str(uuid4()).split("-")[0]
  
      class Flow(LightningFlow):
          def __init__(self, db_root="."):
              super().__init__()
              self._db_filename = os.path.join(db_root, id)
              self.db = Database(
                  db_filename=self._db_filename,
                  models=[TestConfig],
                  store_interval=1,
              )
              self._client = None
              self._start_time = None
              self.counter = 0
  
          def run(self):
              self.counter += 1
  
              self.db.run()
  
              if not self.db.alive():
                  return
  
              if not self._client:
                  self._client = DatabaseClient(
                      self.db.db_url, None, model=TestConfig
                  )
  
              if self._start_time is None:
                  self._client.insert(
                      TestConfig(
                          name="echo",
                          secrets=[
                              Secret(name="example", value="secret")
                          ],
                      )
                  )
                  self._start_time = time.time()
  
              elif (time.time() - self._start_time) > 2:
                  assert os.path.exists(self._db_filename)
                  assert len(self._client.select_all()) == 1
                  self.stop()
  
      try:
          with tempfile.TemporaryDirectory() as tmpdir:
              app = LightningApp(Flow(tmpdir))
              MultiProcessRuntime(app).dispatch()
      except Exception:
          print(traceback.print_exc())
  
imports: import os
  import sys
  import tempfile
  import time
  import traceback
  from pathlib import Path
  from time import sleep
  from typing import List, Optional
  from uuid import uuid4
  import pytest
  from lightning.app import LightningApp, LightningFlow, LightningWork
  from lightning.app.components.database import Database, DatabaseClient
  from lightning.app.components.database.utilities import _GeneralModel, _pydantic_column_type
  from lightning.app.runners import MultiProcessRuntime
  from lightning.app.utilities.imports import _is_sqlmodel_available
label_desc: Use image node_id 3 for calling a global function with example usage: test_work_database_periodic_store() without return types