def METHOD_NAME(ctx, working_directory, target_database):
    dumpfile_dir = pathlib.Path(
        os.path.join(
            working_directory, os.path.basename(settings.BACKUP_ROOT), "latest"
        )
    )
    if not dumpfile_dir.exists():
        raise IOError("dumpfile_dir {} not found".format(dumpfile_dir))
    dumpfile = str(list(dumpfile_dir.glob("comsesnet*"))[0])
    db.restore_from_dump(
        ctx,
        target_database=target_database,
        dumpfile=dumpfile,
        force=True,
        migrate=False,
    )