APIs > py > heapq > heapreplace heapreplace heapreplace[S: HasLtCollectionElement](mut heap: List[S], item: S) -> S