def default_unmarshaller(instance, state):
if hasattr(instance, '<STR_LIT>'):<EOL><INDENT>instance.__setstate__(state)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>instance.__dict__.update(state)<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>.format(instance.__class__.__name__))<EOL><DEDENT><DEDENT>
Restore the state of an object.

If the ``__setstate__()`` method exists on the instance, it is called with the state object
as the argument. Otherwise, the instance's ``__dict__`` is replaced with ``state``.

:param instance: an uninitialized instance
:param state: the state object, as returned by :func:`default_marshaller`