Cheng Huang was the City God, or the spiritual magistrate and guardian deity of a particular Chinese city.
Traditionally, before assuming a new post, local officials used to pass the night in Cheng Huang’s temple seeking guidance. When difficult problems of law later presented themselves, officials returned to the temple, in hopes that Cheng Huang would reveal the answer in a dream.