Perhaps do is the tool for the job?
do
The functionality is already in PyMC
https://www.pymc.io/projects/docs/en/stable/api/model/generated/pymc.model.transform.conditioning.do.html