Support specifying the weight function used by Analyst.removeBlock.