def METHOD_NAME(config, xslt_version, xml):
    try:
        html_generator = get_htmlgenerator(
            xml, config.nonetwork, config.nochecks,
            config.css, config.print_css, config.js,
            config.math_elem_preference, config.math_js,
            config.permlink, config.url_article_page, config.url_download_ris,
            config.gs_abstract,
            config.output_style,
            xslt_version,
            config.bootstrap_css,
            config.article_css,
            config.design_system_static_img_path,
        )
        LOGGER.debug('HTMLGenerator repr: %s' % repr(html_generator))
    except XMLError as e:
        LOGGER.debug(e)
        LOGGER.warning('Error generating %s. Skipping. Run with DEBUG for more info.', xml)
        return
    try:
        abstract_suffix = config.gs_abstract and '.abstract' or ''
        version = xslt_version.replace(".", "_")
        for lang, trans_result in html_generator:
            # nome do arquivo a ser criado
            fname, fext = xml.rsplit('.', 1)
            if xslt_version == "2.0":
                name_parts = [fname, lang + abstract_suffix, 'html']
            else:
                name_parts = [fname, lang + abstract_suffix, version, 'html']
            out_fname = '.'.join(name_parts)
            # criação do arquivo
            with open(out_fname, 'wb') as fp:
                fp.write(etree.tostring(trans_result, pretty_print=True,
                                        encoding='utf-8', method='html',
                                        doctype=u"<!DOCTYPE html>"))
            print('Generated HTML file:', out_fname)
    except TypeError as e:
        LOGGER.debug(e)
        LOGGER.warning('Error generating %s. Skipping. Run with DEBUG for more info.', xml)
        return