@staticmethod
def _cut_order_book(bids, asks, depth):
    if (len(bids) >= depth):
        book = bids[(- depth):]
        book.reverse()
    else:
        book = copy.deepcopy(bids)
        book.reverse()
        book += ([['None', 'None']] * (depth - len(bids)))
    if (len(asks) >= depth):
        book += asks[:depth]
    else:
        book += (asks + ([['None', 'None']] * (depth - len(asks))))
    book = [x[0:2] for x in book]
    return sum(book, [])
@staticmethod
def _cut_order_book(bids, asks, depth):
    if (len(bids) >= depth):
        book = bids[(- depth):]
        book.reverse()
    else:
        book = copy.deepcopy(bids)
        book.reverse()
        book += ([['None', 'None']] * (depth - len(bids)))
    if (len(asks) >= depth):
        book += asks[:depth]
    else:
        book += (asks + ([['None', 'None']] * (depth - len(asks))))
    book = [x[0:2] for x in book]
    return sum(book, [])