code: def _widget_from_p(self, pname, ptype):
          
  
          widget_name = self.type2widget[ptype].__name__.lower()
          widget_name = "_".join([widget_name, pname])
          return getattr(self, widget_name)
docs: Returns a widget from its ptype and pname