def METHOD_NAME(request):
    # TODO: check if nydusd executable exists and have a proper version
    # TODO: check if bootstrap exists
    # TODO: check if blob cache file exists and try to clear it if it does
    # TODO: check if blob file was put to oss
    nyta = NydusAnchor()
    nyta.check_prerequisites()
    logging.info("*** Testing case %s ***", os.environ.get("PYTEST_CURRENT_TEST"))
    yield nyta
    nyta.clear_blobcache()
    if hasattr(nyta, "scratch_dir"):
        logging.info("Clean up scratch dir")
        shutil.rmtree(nyta.scratch_dir)
    if hasattr(nyta, "nydusd") and nyta.nydusd is not None:
        nyta.nydusd.shutdown()
    if hasattr(nyta, "overlayfs") and os.path.ismount(nyta.overlayfs):
        nyta.umount_overlayfs()
    # Check if nydusd is crashed.
    # TODO: Where the core file is places is controlled by kernel.
    # Check `/proc/sys/kernel/core_pattern`
    files = os.listdir()
    for one in files:
        assert re.match("^core\..*", one) is None
    try:
        shutil.rmtree(nyta.localfs_workdir)
    except FileNotFoundError:
        pass
    try:
        nyta.cleanup_dustbin()
    except FileNotFoundError:
        pass
    # All nydusd should stop.
    assert not NydusAnchor.capture_running_nydusd()