def get_mock_environment(dataset_path: Path, project_path: Path) -> Path:
    """Return mock directory for testing with datapath setup to dummy data."""
    ens_temp_dir = project_path / "ens_tmp"
    ens_temp_dir.mkdir(exist_ok=True)

    with Path("tests/integration/pipelines/tiled_ensemble.yaml").open(encoding="utf-8") as file:
        config = yaml.safe_load(file)

    # use separate project temp dir to avoid messing with other tests
    config["default_root_dir"] = str(ens_temp_dir)
    config["data"]["init_args"]["root"] = str(dataset_path / "mvtecad")

    with (Path(ens_temp_dir) / "tiled_ensemble.yaml").open("w", encoding="utf-8") as file:
        yaml.safe_dump(config, file)

    return Path(ens_temp_dir)
Return mock directory for testing with datapath setup to dummy data.
tests/integration/pipelines/test_tiled_ensemble.py