<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def use_db(path, mode=WorkDB.Mode.create):
 """ 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. """

    database = WorkDB(path, mode)
    try:
        yield database
    finally:
        database.close()