code: def on_draw_event(self, widget, ctx):
      with (
          self.toolbar._wait_cursor_for_draw_cm()
          if self.toolbar
          else nullcontext()
      ):
          self._renderer.set_context(ctx)
          scale = self.device_pixel_ratio
          # Scale physical drawing to logical size.
          ctx.scale(1 / scale, 1 / scale)
          allocation = self.get_allocation()
          Gtk.render_background(
              self.get_style_context(),
              ctx,
              allocation.x,
              allocation.y,
              allocation.width,
              allocation.height,
          )
          self._renderer.dpi = self.figure.dpi
          self.figure.draw(self._renderer)
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/backends/backend_gtk3cairo.py
imports: from contextlib import nullcontext
  from .backend_cairo import FigureCanvasCairo
  from .backend_gtk3 import Gtk, FigureCanvasGTK3, _BackendGTK3
label_desc: Use image node_id 1 for calling the FigureCanvasGTK3Cairo obj's underlying member method code with example usage: obj.on_draw_event(widget, ctx) without return types