California Welfare And Institutions Code Section 4426
The department may inquire into the manner in which any mentally retarded person subject to commitment, not confined in a state hospital, is cared for and maintained. If, in its judgment, any such person is not properly and suitably cared for, it may apply to a judge of the superior court for an order to commit him to a state hospital under the provisions of this code. Such order shall not be made unless the judge finds, and certifies in the order, that such person is not properly or suitably cared for by his relatives or guardian or conservator, or that it is dangerous to the public to allow him to be cared for and maintained by such relatives or guardian or conservator.