def get_batch(datadic_cache, batchnum):
    """
    get batch from cache according to the batchnum
    """
    # load original batchdata for process
    if batchnum not in datadic_cache:
        datadic_cache[batchnum] = datadic_cache.dp.get_batch(batchnum)
    datadic = datadic_cache[batchnum]
    return datadic