def setInstanceState(inst, unjellier, jellyList):
 state = unjellier.unjelly(jellyList[1])
 if hasattr(inst, '__setstate__'):
  inst.__setstate__(state)
 else:
  inst.__dict__ = state
 return inst

def setInstanceState ( inst , unjellier , jellyList ) : state = unjellier . unjelly ( jellyList [ 1 ] ) if hasattr ( inst , '__setstate__' ) : inst . __setstate__ ( state ) else : inst . __dict__ = state return inst
utility method to default to normal state rules in unserialization .