'I will be invoked with the state to copy locally.
\'state\' is the data returned from the remote object\'s
\'getStateToCopyFor\' method, which will often be the remote
object\'s dictionary (or a filtered approximation of it depending
on my peer\'s perspective).'

def setCopyableState(self, state):

    if _PY3:
        state = {(x.decode('utf8') if isinstance(x, bytes) else x): y for (x, y) in state.items()}
    self.__dict__ = state
