def METHOD_NAME(self, mydict, method, *args, **kw):
    version1 = _testcapi.dict_get_version(mydict)
    self.seen_versions.add(version1)
    result = method(*args, **kw)
    version2 = _testcapi.dict_get_version(mydict)
    self.assertEqual(version2, version1, "version changed")
    return  result