def METHOD_NAME(tmp_path_factory):
    data_dir = tmp_path_factory.mktemp("data")
    brain_dir = data_dir / "braintest"
    brain_dir.mkdir()
    val_dir = brain_dir / "val"
    val_dir.mkdir()
    im_probs = np.zeros((2, 10, 10, 10))
    im = np.zeros((3, 10, 10, 10))
    im_probs[1, :, :, :7] = 0.9
    for fname in ["subvol1_pos", "subvol2_pos", "subvol3_neg"]:
        fname_im = fname + ".h5"
        im_path = val_dir / fname_im
        with h5py.File(str(im_path), "w") as f:
            f.create_dataset("image_3channel", data=im)
        fname_prob = fname + "_Probabilities.h5"
        path = val_dir / fname_prob
        with h5py.File(path, "w") as f:
            f.create_dataset("exported_data", data=im_probs)
    return data_dir