get_jacobian.glm <- function(test_mean, ...){
  stopifnot(is(test_mean, "glm"), !is.null(test_mean[["x"]]))
  f <- function(theta){
    test_mean[["family"]][["linkinv"]](colSums(theta * t(test_mean[["x"]])))
  }
  output <- as.matrix(drop(calculus::jacobian(f = f, var = unname(test_mean[["coefficients"]]))))
  return(output)
}
