code: def run(self, fig):
          
          # Calling savefig executes the draw() command, putting elements
          # in the correct place.
          fig.savefig(io.BytesIO(), format='png', dpi=fig.dpi)
          if self.close_mpl:
              import matplotlib.pyplot as plt
              plt.close(fig)
          self.crawl_fig(fig)
docs: Run the exporter on the given figure
  
          Parmeters
          ---------
          fig : matplotlib.Figure instance
              The figure to export