code: private BlockInfo removeBlockFromMap(Block b) {
      if (b == null) {
        return null;
      }
       ns.decrementSafeBlockCountForBlockRemoval(b);
      return blocks.remove(b);
    }
docs: All removals from the blocks map goes through this function.
  
  @param b
  block to be removed
  @param decrementSafeBlockCount
  whether need to decrement safe block count when needed
  @return the {@link BlockInfo} for the removed block