@staticmethod<EOL><INDENT>def create_for_wrong_result_type(parser: _BaseParserDeclarationForRegistries, desired_type: Type[T],<EOL>obj: PersistedObject, result: T, options: Dict[str, Dict[str, Any]]):<DEDENT>
msg = "<STR_LIT>""<STR_LIT>".format(obj=obj, typ=get_pretty_type_str(desired_type), p=parser,<EOL>opts=options, tret=type(result), ret=result)<EOL>return WrongTypeCreatedError(msg)<EOL>
Helper method provided because we actually can't put that in the constructor, it creates a bug in Nose tests
https://github.com/nose-devs/nose/issues/725

:param parser:
:param desired_type:
:param obj:
:param result:
:param options:
:return: