def METHOD_NAME(get_appstate_dir_mock: Mock, tmp_path):
    (tmp_path / 'some_file').write_text('')
    get_appstate_dir_mock.return_value = tmp_path
    with pytest.raises(NotADirectoryError, match=r'^\[Errno 20\] Root state path is not a directory:'):
        get_root_state_directory(home_dir_postfix='some_file')