Old Python version of lmdb-replay.c.