def remove_from_pool(self, item: MempoolItem):
    '\n        Removes an item from the mempool.\n        '
    removals: List[Coin] = item.removals
    additions: List[Coin] = item.additions
    for rem in removals:
        del self.removals[rem.name()]
    for add in additions:
        del self.additions[add.name()]
    del self.spends[item.name]
    del self.sorted_spends[item.fee_per_cost][item.name]
    dic = self.sorted_spends[item.fee_per_cost]
    if (len(dic.values()) == 0):
        del self.sorted_spends[item.fee_per_cost]
    self.total_mempool_cost -= item.cost
    assert (self.total_mempool_cost >= 0)
Removes an item from the mempool.
def remove_from_pool(self, item: MempoolItem):
    '\n        \n        '
    removals: List[Coin] = item.removals
    additions: List[Coin] = item.additions
    for rem in removals:
        del self.removals[rem.name()]
    for add in additions:
        del self.additions[add.name()]
    del self.spends[item.name]
    del self.sorted_spends[item.fee_per_cost][item.name]
    dic = self.sorted_spends[item.fee_per_cost]
    if (len(dic.values()) == 0):
        del self.sorted_spends[item.fee_per_cost]
    self.total_mempool_cost -= item.cost
    assert (self.total_mempool_cost >= 0)