Equvilant APIs in PyMC v4

And this is the approach suggested in the comment: pymc/metropolis.py at main · pymc-devs/pymc · GitHub