def flush_queue(queue):
    """Get all data from the queue.

    Notes: this is just a multiprocessing support function.

    Args:
        queue (Queue): the multiprocessing queue

    Returns:
        list: the result data pushed in the queue
    """
    data = []
    while not queue.empty():
        data.append(queue.get())
    return data