def METHOD_NAME(self, fun: Callable[[Any], float], key: Optional[str] = None, reverse = False) -> None:
    """Sort the list.
    :param fun: The callable to use for determining the sort key.
    :param key: Use the sorting function on the underlying data
    :param reverse: reverse the sorted results
    """
    self.beginResetModel()
    if key:
        self._items = sorted(self._items, key = lambda item: fun(itemgetter(key)(item)), reverse = reverse)
    else:
        self._items.METHOD_NAME(key = fun, reverse = reverse)
    self.endResetModel()