def model_json_decoder(dct):
 if (u'__model__' in dct):
  model_name = dct.pop(u'__model__')
  if (model_name in immutable._models):
   cls = immutable._models[model_name]
   return cls(**dct)
 return dct

def model_json_decoder ( dct ) : if ( u'__model__' in dct ) : model_name = dct . pop ( u'__model__' ) if ( model_name in immutable . _models ) : cls = immutable . _models [ model_name ] return cls ( ** dct ) return dct
automatically deserialize mopidy models from json .