ENH: coded unpaint_block function