def METHOD_NAME(tmp_path):
    d = PersistentDict(tmp_path)
    d.setdefault('a', 1)
    expected = {'a': 1}
    # Check the in-memory version is updated
    recursive_assert_equal(d, expected)
    # Check that the __repr__ reflects this.
    assert "{'a': 1}" in repr(d)
    # Check that contents are synced to disk at exit.
    del d
    gc.collect()
    actual = PersistentDict(tmp_path)
    recursive_assert_equal(actual, expected)