Looks very similar to the blockData function in dedupe.convenience