just to check would:

sum([_unpack_epochs(epoch) for epoch in epochs])

work too?