Sort _WeakList.
        :param key: Key by which to sort, default None.
        :param reverse: True if return reversed WeakList, false by default.

def sort(self, *, key: Optional[Callable[[Any], Any]] = None, reverse: bool = False) -> None:
        """
        Sort _WeakList.
        :param key: Key by which to sort, default None.
        :param reverse: True if return reversed WeakList, false by default.
        """
        return list.sort(self, key=self._sort_key(key), reverse=reverse)