def __setstate__(self, state):
        value, version = state

        self._value = value

        if version == 4:
            self._module = _ipv4
        elif version == 6:
            self._module = _ipv6
        else:
            raise ValueError('unpickling failed for object state: %s' \
                % str(state))
Test that replaying encrypted messages to the server invalidates them.
dataset/ETHPy150Open drkjam/netaddr/netaddr/ip/__init__.py/IPAddress.__setstate__--crossover with--dataset/ETHPy150Open google/grr/grr/lib/communicator_test.py/ClientCommsTest.testServerReplayAttack