def METHOD_NAME(tmpdir):
    """
    Test how broken symlinks are handled during hashing
    """
    os.chdir(tmpdir)
    file = os.path.join(os.getcwd(), "arr.npy")
    arr = np.array([2])
    np.save(file, arr)
    file_link = os.path.join(os.getcwd(), "link_to_arr.npy")
    os.symlink(file, file_link)
    os.remove(file)
    nn = file_add2(name="add2", file=file_link)
    # raises error inside task
    # unless variable is defined as a File pydra will treat it as a string
    with pytest.raises(FileNotFoundError):
        with Submitter(plugin="cf") as sub:
            sub(nn)
    with pytest.raises(FileNotFoundError, match="do not exist"):
        file_add2_annot(name="add2_annot", file=file_link)