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