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 obj_type:
        :param types_supported:
        :return:

def create(obj: PersistedObject, obj_type: Type[T], types_supported: Iterable[str]):
        """
        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 obj_type:
        :param types_supported:
        :return:
        """

        # base message
        msg = str(obj) + ' cannot be parsed as a ' + get_pretty_type_str(obj_type) + ' because no parser supporting ' \
              'that type is registered for ' + obj.get_pretty_file_ext() + '.\n'

        # add details
        if types_supported is not None and len(types_supported) > 0:
            msg += ' If you wish to parse this object from this extension, you may wish to parse it as one of the ' \
                   'following supported types : ' + str(types_supported) + '. \n' \
                   + 'Otherwise, please register a new parser for type ' + get_pretty_type_str(obj_type) \
                   + ' and extension ' + obj.get_pretty_file_ext() + '\n Reminder: use print_capabilities_by_ext()' \
                   + ' and print_capabilities_by_type() to diagnose what are the parsers available'
        else:
            raise ValueError('extensions_supported should be provided to create a NoParserFoundForObjectExt. If no '
                             'extension is supported, use NoParserFoundForObjectType.create instead')

        e = NoParserFoundForObjectType(msg)

        # save the extensions supported
        e.types_supported = types_supported

        return e