code: def _update_device_pixel_ratio(self, *args, **kwargs):
      # We need to be careful in cases with mixed resolution displays if
      # device_pixel_ratio changes.
      if self._set_device_pixel_ratio(self.get_scale_factor()):
          # The easiest way to resize the canvas is to emit a resize event
          # since we implement all the logic for resizing the canvas for that
          # event.
          self.queue_resize()
          self.queue_draw()
  
imports: import functools
  import logging
  import os
  from pathlib import Path
  import matplotlib
  from matplotlib import _api, backend_tools, cbook
  from matplotlib.backend_bases import ToolContainerBase, CloseEvent, KeyEvent, LocationEvent, MouseEvent, ResizeEvent
  from gi.repository import Gio, GLib, GObject, Gtk, Gdk
  from .None import _backend_gtk
  from ._backend_gtk import _BackendGTK, _FigureCanvasGTK, _FigureManagerGTK, _NavigationToolbar2GTK, TimerGTK
label_desc: Use image node_id 16 for calling the FigureCanvasGTK3 obj's underlying member method code with example usage: obj._update_device_pixel_ratio() without return types