def get_many(mp_queue, queue, n):
    """
    Safely gets n items from the queue
    and inserts them into another one
    (if there are less items takes all of them)
    (if there are no items returns False)
    """
    if mp_queue.empty():
        return False
    for i in range(n):
        if mp_queue.empty():
            break
        item = mp_queue.get()
        queue.put_nowait(item)
    return True