'Insert widget description `desc` into `category`.'

def _insert_widget(self, category, desc):

    assert isinstance(category, description.CategoryDescription)
    (_, widgets) = self._categories_dict[category.name]
    priority = desc.priority
    priorities = [w.priority for w in widgets]
    insertion_i = bisect.bisect_right(priorities, priority)
    widgets.insert(insertion_i, desc)
    self._widgets_dict[desc.qualified_name] = desc
