def create_bmi_model(self, engine, bmi_class=None, wrapper_kwargs=None):
if wrapper_kwargs is None:<EOL><INDENT>wrapper_kwargs = {}<EOL><DEDENT>if bmi_class is None:<EOL><INDENT>wrapper_class = bmi.wrapper.BMIWrapper<EOL><DEDENT>else:<EOL><INDENT>wrapper_class = self.import_from_string(bmi_class)<EOL><DEDENT>try:<EOL><INDENT>"""<STR_LIT>"""<EOL>model = wrapper_class(<EOL>engine,<EOL>**wrapper_kwargs<EOL>)<EOL><DEDENT>except TypeError as e:<EOL><INDENT>"""<STR_LIT>"""<EOL>logger.warn(<EOL>'<STR_LIT>',<EOL>wrapper_class<EOL>)<EOL>model = wrapper_class(<EOL>**wrapper_kwargs<EOL>)<EOL><DEDENT>return model<EOL>
initialize a bmi mode using an optional class