def _make_model(self, data, key=None):
if data['<STR_LIT>'] and not self.adapter.want_deleted:<EOL><INDENT>raise ObjectDoesNotExist('<STR_LIT>')<EOL><DEDENT>model = self._model_class(self._current_context,<EOL>_pass_perm_checks=self._pass_perm_checks)<EOL>model.setattr('<STR_LIT:key>', ub_to_str(key) if key else ub_to_str(data.get('<STR_LIT:key>')))<EOL>model = model.set_data(data, from_db=True)<EOL>model._initial_data = model.clean_value()<EOL>return model<EOL>
Creates a model instance with the given data.

Args:
    data: Model data returned from DB.
    key: Object key
Returns:
    pyoko.Model object.