def error(message, level="error", exit_code=1, **kwargs):
    kwargs["fg"] = kwargs.get("fg", "red")
    click.secho(u"error: {}".format(message), **kwargs)
    sys.exit(exit_code)
def _on_item_widget_size_allocate(self, item_widget, allocation, item):
    if item in self._items_allocations:
      self._update_width(allocation.width - self._items_allocations[item].width)
      self._update_height(allocation.height - self._items_allocations[item].height)
    else:
      self._update_width(allocation.width)
      self._update_height(allocation.height + self._item_spacing)