When two or more defendants are jointly indicted, the court may direct a verdict of acquittal to be entered in favor of any one of them against whom there is not, in the opinion of the court, evidence to put him on his defense; and, being acquitted, he may be a witness.