def METHOD_NAME(self, lines):
    def replace(match):
        lang, _id, classes, config = None, '', [], {}
        if match.group('attrs'):
            _id, classes, config = self.handle_attrs(get_attrs(match.group('attrs')))
            _id = slugify_id(_id)
            if len(classes):
                lang = classes[0]
        elif match.group('lang'):
            lang = match.group('lang')
            classes.append(lang)
        if lang == 'plantuml-prefix':
            self._prefix = [f"-c{line}" for line in match.group('code').split('\n')]
            return ''
        if lang != 'plantuml':
            return match.group()  # the normal FencedBlockPreprocessor extension will process it later
        def div_start():
            return [f'<div class="{" ".join(classes)}" style="display: inline-block; vertical-align: top;">']
        def listing():
            listing_lines = match.group().split('\n')
            listing_lines[0] = first_line_for_listing_block(match)
            rendered = FencedBlockPreprocessor.METHOD_NAME(self, listing_lines)
            return div_start() + rendered + ['</div>']
        def svg():
            rendered_bytes, error = self.plantuml_manager.render(
                match.group('code').encode('utf8'),
                self._plantuml_markdown_args + self._prefix + ['-tsvg']
            )
            if error:
                # Note we never "continue" when rendered_bytes is empty because that likely means PlantUML failed to start
                if len(rendered_bytes) and self.plantuml_manager.continue_after_failure:
                    self._logger.warning(error)
                else:
                    raise Exception(error)
            rendered_str = rendered_bytes.decode('utf8')
            rendered_str = re.sub(r'^<\?xml [^>]+\?>', '', rendered_str)  # remove "<?xml ... ?>" header
            return div_start() + [rendered_str, '</div>']
        html = [f'<div id="{_id}">' if _id else '<div>']
        if 'listing+svg' in config:
            html.extend(listing())
            html.extend(svg())
        elif 'svg+listing' in config:
            html.extend(svg())
            html.extend(listing())
        elif 'listing' in config:
            html.extend(listing())
        else:
            html.extend(svg())
        html.append('</div>')
        return self.md.htmlStash.store(''.join(html))
    return self.FENCED_BLOCK_RE.sub(replace, '\n'.join(lines)).split('\n')