':type tick: TickEntry'

def remove_tick(self, tick):

    assert isinstance(tick, TickEntry), type(tick)
    self._depth -= tick.quantity
    self._length -= 1
    if (self._length == 0):
        return
    prev_tick = tick.prev_tick
    next_tick = tick.next_tick
    if ((prev_tick is not None) and (next_tick is not None)):
        prev_tick.next_tick = next_tick
        next_tick.prev_tick = prev_tick
    elif (next_tick is not None):
        next_tick.prev_tick = None
        self._head_tick = next_tick
    elif (prev_tick is not None):
        prev_tick.next_tick = None
        self._tail_tick = prev_tick
