class_docstr: A helper class to implement a renderer that switches between
  vector and raster drawing.  An example may be a PDF writer, where
  most things are drawn with PDF vector commands, but some very
  complex objects, such as quad meshes, are rasterised and then
  output as images.
docstr: Exit "raster" mode.  All of the drawing that was done since
  the last `start_rasterizing` call will be copied to the
  vector backend by calling draw_image.
code: def stop_rasterizing(self):
      """
      Exit "raster" mode.  All of the drawing that was done since
      the last `start_rasterizing` call will be copied to the
      vector backend by calling draw_image.
      """
  
      self._renderer = self._vector_renderer
  
      height = self._height * self.dpi
      img = np.asarray(self._raster_renderer.buffer_rgba())
      slice_y, slice_x = cbook._get_nonzero_slices(img[..., 3])
      cropped_img = img[slice_y, slice_x]
      if cropped_img.size:
          gc = self._renderer.new_gc()
          # TODO: If the mixedmode resolution differs from the figure's
          #       dpi, the image must be scaled (dpi->_figdpi). Not all
          #       backends support this.
          self._renderer.draw_image(
              gc,
              slice_x.start * self._figdpi / self.dpi,
              (height - slice_y.stop) * self._figdpi / self.dpi,
              cropped_img[::-1],
          )
      self._raster_renderer = None
  
      # restore the figure dpi.
      self.figure.dpi = self._figdpi
  
      if self._bbox_inches_restore:  # when tight bbox is used
          r = process_figure_for_rasterizing(
              self.figure, self._bbox_inches_restore, self._figdpi
          )
          self._bbox_inches_restore = r
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/backends/backend_mixed.py
imports: import numpy
  from matplotlib import cbook
  from .backend_agg import RendererAgg
  from matplotlib._tight_bbox import process_figure_for_rasterizing
label_desc: Use image node_id 4 for calling the MixedModeRenderer obj's underlying member method code with example usage: obj.stop_rasterizing() without return types