def set_lock(lock) ->None:
    """
    Set lock object, used to have the same lock object
    in all processes even if using spawn process start method.
    """
    global sqlite_lock
    sqlite_lock = lock
