Build custom random method with reject sampling

Thank you so much for your kind reply!

I have two another questions.
1.Is there any sample of custom generate_samples?
2.Is there any other simple way to implement random of complex distribution?

To be honest, I almost have no statistics nor programming background so I’ll start with studying generate_samples.
Using pymc3 inference is not so hard but understanding the inside is difficult for me now…