(1) At any and all stages of the proceedings pursuant to this chapter, any person subject to the provisions of this chapter shall be entitled to the assistance of counsel, and if the person is indigent the court shall appoint counsel to assist him or her. A person may waive his or her right to counsel; but such waiver shall only be effective if a court makes a specific finding that he or she is or was competent to so waive. In making such findings, the court shall be guided but not limited by the following standards: Whether the person attempting to waive the assistance of counsel, does so understanding:
(a) The nature of the charges;
(b) The statutory offense included within them;
(c) The range of allowable punishments thereunder;
(d) Possible defenses to the charges and circumstances in mitigation thereof; and
(e) All other facts essential to a broad understanding of the whole matter.
(2) Whenever any person is subjected to an examination pursuant to any provision of this chapter, he or she may retain an expert or professional person to perform an examination in his or her behalf. In the case of a person who is indigent, the court shall upon his or her request assist the person in obtaining an expert or professional person to perform an examination or participate in the hearing on his or her behalf. An expert or professional person obtained by an indigent person pursuant to the provisions of this chapter shall be compensated for his or her services out of funds of the department, in an amount determined by the secretary to be fair and reasonable.
(3) Any time the defendant is being examined by court appointed experts or professional persons pursuant to the provisions of this chapter, the defendant shall be entitled to have his or her attorney present.
(4) In a competency evaluation conducted under this chapter, the defendant may refuse to answer any question if he or she believes his or her answers may tend to incriminate him or her or form links leading to evidence of an incriminating nature.
(5) In a sanity evaluation conducted under this chapter, if a defendant refuses to answer questions or to participate in an examination conducted in response to the defendant's assertion of an insanity defense, the court shall exclude from evidence at trial any testimony or evidence from any expert or professional person obtained or retained by the defendant.