boot_correction <- function(x, y, method, B = 5, ...) {
  P = NCOL(x)
  N = NROW(x)
  res = matrix(0, B, P)
  ori = method(x, y, ...)$oimp
  for (i in 1:B) {
    idx = sample.int(n = N, size = N, replace = TRUE)
    tmp = method(x, y[idx])
    res[i,] = tmp$oimp
  }
  cmu = colMeans(res)
  csd = apply(res, 2, sd)
  #idx = which(csd < 1e-5)
  #cmu[idx] = 0
  #csd[idx] = 1
  res = (ori - cmu) / csd
  names(res) = names(ori)
  imp_scale(res)
}
