The progress bar is handy for long-running functions, but some like injection are inside numba JIT functions. This package looks promising.
injection