Defendants who are incompetent to stand trial have a major mental illness, brain injury, mental retardation or other condition that is severe enough to cause them to be unable to understand the legal proceedings against them or to cause them serious impairment in working with the defense attorney.