def set_model(self, model=None, model_class=None):
if model:<EOL><INDENT>self._model = model<EOL>self._model_class = model.__class__<EOL>self._current_context = self._model._context<EOL>self._cfg['<STR_LIT>'] = self._model._context<EOL><DEDENT>if model_class:<EOL><INDENT>self._model = self._model or None<EOL>self._model_class = model_class<EOL>self._current_context = self._current_context or None<EOL><DEDENT>self._cfg['<STR_LIT>'] = self._model_class<EOL>self.adapter = Adapter(**self._cfg)<EOL>
Args:
    model: Model name
    model_class: Model class