code: def proxy_for(widget):
      
      proxy_type = widget_proxies.get(widget.__class__)
      if proxy_type is None:
          raise KeyError('There is no proxy type registered for %r' % widget)
      return proxy_type(widget)
docs: Create a proxy for a Widget
  
      :param widget: A gtk.Widget to proxy
  
      This will raise a KeyError if there is no proxy type registered for the
      widget type.