def create(obj: PersistedObject, obj_type: Type[T], errors: Dict[Type, Exception]):
        """
        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 obj:
        :param errors: a dictionary of the errors raised for each alternate type tried
        :return:
        """

        e = NoParserFoundForUnionType('{obj} cannot be parsed as a {typ} because no parser could be found for any of '
                                      'the alternate types. Caught exceptions: {errs}'
                                      ''.format(obj=obj, typ=get_pretty_type_str(obj_type), errs=errors))

        # save the errors
        e.errors = errors

        return e
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 obj:
        :param errors: a dictionary of the errors raised for each alternate type tried
        :return: