The trial court had the power to direct a verdict of sanity where there was no substantial evidence that the offender was insane at the time of the offense. After first rejecting the Peoples argument of forfeiture because it would have been futile for appellant to have argued in the trial court that the court lacked the power to direct a verdict of sanity, the appellate court adopted the holding in People v. Ceja (2003) 106 Cal.App.4th 1071, which held that trial courts have an inherent power to remove an insanity defense from the jury when there is no evidence to support it. The Third District found no constitutional entitlement to a presumption of insanity, and thus no bar to a directed verdict where the defendant has not met his burden of proof. The evidence here, viewed in the light most favorable to the defendant, did not provide a substantial basis for the jury to find that he was insane at the time of the offenses. Thus the trial court did not err in directing a verdict of sanity.