In proceedings under Penal Code section 1368 to determine a defendants competency to stand trial, the court may order the defendant to submit to a mental examination by an expert designated by the prosecution. The defendant may not refuse to submit to such an examination based upon the Fifth Amendment due to a judicially declared rule of immunity which assures that the accused will not be convicted by use of information obtained at the examination, nor may such information or its fruits be used in sentencing. The same rule of judicial immunity similarly prevents appellant from asserting any Sixth Amendment right to counsel at such a mental examination. If the defendant refuses to submit to the ordered examination, the court may impose those sanctions listed in the Civil Discovery Act (Code of Civ. Proc., sec. 2032, subd.(f)), including disclosing the refusal to the jury.