code: def set_linewidth(self, w):
      GraphicsContextBase.set_linewidth(self, w)
      if w == 0:
          self.gdkGC.line_width = 0
      else:
          pixels = self.renderer.points_to_pixels(w)
          self.gdkGC.line_width = max(1, int(np.round(pixels)))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import warnings
  import gobject
  import gtk
  import pango
  import numpy
  import matplotlib
  from matplotlib import rcParams
  from matplotlib._pylab_helpers import Gcf
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase
  from matplotlib.cbook import warn_deprecated
  from matplotlib.mathtext import MathTextParser
  from matplotlib.transforms import Affine2D
  from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
label_desc: Use image node_id 8 for calling the GraphicsContextGDK obj's underlying member method code with example usage: obj.set_linewidth(w) without return types