def METHOD_NAME(tmpdir):
    target = Path(tmpdir) / "user/is/fake/myfile.pdf"
    assert not target.parent.is_dir()
    assert not target.exists()
    write_file_locally(b"something", target)
    assert target.exists()
    assert target.read_text() == "something"
    write_file_locally(b"something else", str(target))
    assert target.read_text() == "something else"