code: def use_db(path, mode=WorkDB.Mode.create):
      
      database = WorkDB(path, mode)
      try:
          yield database
      finally:
          database.close()
docs: Open a DB in file `path` in mode `mode` as a context manager.
  
      On exiting the context the DB will be automatically closed.
  
      Args:
        path: The path to the DB file.
        mode: The mode in which to open the DB. See the `Mode` enum for
          details.
  
      Raises:
        FileNotFoundError: If `mode` is `Mode.open` and `path` does not
          exist.