It is most closely related to legal definition of insanity. It is because this is a way of determining or pointing out an individual who has a mental illness of which he or she has a behavior that he or she couldn't control and in a way that he or she does not understand or distinguish which is reality or fantasy. When the person exhibits this, it is likely that he or she does not recognize his or her own act whether if it is wrong or not.