A motion to assert self-defense immunity shall be made in writing and is to be filed prior to arraignment.
A request for self-defense immunity may be decided in conjunction with a preliminary examination or at a separate evidentiary hearing, unless the parties stipulate to the factual record.
The period for filing such motion may be enlarged by the court where the grounds therefore were not known to the defendant and could not with reasonable diligence have been discovered by the defendant prior to arraignment, or for good cause shown.
A defendant, who has not asserted self-defense immunity, may contend at trial that s/he used force which, subject to provisions of K.S.A. 21-5226, and amendments thereto, was justified pursuant to K.S.A. 21-5222, 21-5223, or 21-5225, and amendments thereto.