What does it mean can not pickle due to not finding function for parallel chain sampling

I tried running the example arbitrary_stochstic.py. It bumps out an error

CustomizablePickler(buffer, self._reducers).dump(obj)

AttributeError: Can’t pickle local object ‘build_model..logp’

There is one post which explains this is due to “it cannot pickle a function for parallel chain sampling”. This is code from git, I did not make any changes. Can someone explain what is wrong and how to fix. I see the same error in my own code and don’t get what is the problem. I do have an idea about parallel sampling, but how does this code violate parallel chain sampling?

Multiprocessing requires everything passed to thread to be picklable. Lambdas defined in local namespace are not picklable.
PicklingError with njobs>1 using DensityDist · Issue #1995 · pymc-devs/pymc · GitHub

I submitted a PR today actually to fix the example Update pymc3\examples by junpenglao · Pull Request #2947 · pymc-devs/pymc · GitHub

Thank you, I fixed it according to the instructions.