Insanity is a legal concept. A person judged to have been insane at the time he or she committed a crime cannot be held responsible for those actions. Competency, also a legal concept, refers to defendants' capability of standing trial, that is, understanding a trial's purpose and procedures and cooperating in their own defense, at the time of trial. No simple relationships exist between diagnosed psychological disorders and court findings of insanity. If defendants are declared insane or incompetent, they are usually provided mental health treatment. The nature of the treatment depends upon a variety of factors including the mental disorder diagnosis.