If the date of discharge occurs before the expiration of a period of control equal to the maximum term prescribed by law for the offense of which he or she was convicted, and if the Department of the Youth Authority believes that unrestrained freedom for that person would be dangerous to the public, the Department of the Youth Authority shall petition the court by which the commitment was made.
The petition shall be accompanied by a written statement of the facts upon which the department bases its opinion that discharge from its control at the time stated would be dangerous to the public, but a petition may not be dismissed merely because of its form or an asserted insufficiency of its allegations; every order shall be reviewed upon its merits.
Ca. Welf. and Inst. Code § 1780