The inclusion of this verse after the concluding summary, is somewhat strange. The prohibition has already been treated in Leviticus 20:6. There, the penalty for disobedience was that the Lord would set his face against the individuals and that they would be cut off from the people. In this instance however, the language is that of capital punishment. Just in case there is any misunderstanding, the present verse states that such a person will be put to death.
27 “A man or a woman who is a medium or a necromancer shall surely be put to death. They shall be stoned with stones; their blood shall be upon them.”