def METHOD_NAME(batch_size, epochs=1, device='cpu'):
    pipe = video_decoder_pipeline(batch_size=batch_size, device_id=0, num_threads=4,
                                  source=video_loader(batch_size, epochs), device=device)
    pipe.build()
    for _ in range(int((epochs * len(files) + batch_size - 1) / batch_size)):
        output, = pipe.run()
        if isinstance(output, TensorListGPU):
            output = output.as_cpu()
        for i in range(batch_size):
            yield np.array(output[i])