def METHOD_NAME(self):
    png = self._repr_png_()
    url = 'data:image/png;base64,' + base64.b64encode(png).decode('utf-8')
    _alt = html.escape(self.alt_text) if self.alt_text is not None else ''
    return f'<img src="{url}" alt="{_alt}"></img>'