Coding the Backdoor Criterion to estimate the total effect of variables and selecting priors

Can you please provide me a sample code on this? I could do the rest but since I am new to programming I am having hard time creating the correct model.

So the model is structurally just some linear regressions. The closest example is for a moderation model Bayesian mediation analysis — PyMC3 3.11.5 documentation