Can you try to format your post to display code cells correctly? You can use triple back ticks “`” for that.
Otherwise, if you are just starting I suggest you try to use PyMC>4.0 instead of PyMC3. One of the things that improved a lot is indeed the use of DensityDist. There are some code snippets that show how to implement it in V4: pymc.DensityDist — PyMC 0+untagged.345.g2bd0611.dirty documentation