'Private API used for pickling.'

def __setstate__(self, state):

    if (len(state) != 1):
        raise TypeError(('Invalid    state    length,    expected    1;    received    %i' % len(state)))
    kwargs = state[0]
    if (not isinstance(kwargs, dict)):
        raise TypeError(('Key    accepts    a    dict    of    keyword    arguments    as    state;    received    %r' % kwargs))
    self.__reference = None
    self.__pairs = tuple(kwargs['pairs'])
    self.__app = kwargs['app']
    self.__namespace = kwargs['namespace']
