def METHOD_NAME(self, context, source):
    # The voila exporter overrides the markdown renderer from the HTMLExporter
    # to inline images.
    cell = context["cell"]
    attachments = cell.get("attachments", {})
    cls = self.markdown_renderer_class
    renderer = cls(
        escape=False,
        attachments=attachments,
        contents_manager=self.contents_manager,
        anchor_link_text=self.anchor_link_text,
    )
    return MarkdownWithMath(renderer=renderer).render(source)