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 att_name:
        :param parsed_att:
        :param attribute_type:
        :param caught_exec:
        :return:

def create(att_name: str, parsed_att: S, attribute_type: Type[T], caught_exec: Dict[Converter[S, T], 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 att_name:
        :param parsed_att:
        :param attribute_type:
        :param caught_exec:
        :return:
        """
        base_msg = "Error while trying to convert value for attribute '{a}' to type <{t}>:\n" \
                   "   - parsed value is : '{v}' of type <{tv}>\n" \
                   "".format(a=str(att_name), t=get_pretty_type_str(attribute_type), v=parsed_att,
                             tv=get_pretty_type_str(type(parsed_att)))

        msg = StringIO()
        if len(list(caught_exec.keys())) > 0:
            msg.writelines('   - converters tried are : \n      * ')
            msg.writelines('\n      * '.join([str(converter) for converter in caught_exec.keys()]))
            msg.writelines(' \n Caught the following exceptions: \n')

            for converter, err in caught_exec.items():
                msg.writelines('--------------- From ' + str(converter) + ' caught: \n')
                print_error_to_io_stream(err, msg)
                msg.write('\n')

        return AttrConversionException(base_msg + msg.getvalue())