Children Act
7. Power to clear court Where in any proceedings in relation to an offence against, or any conduct contrary to, decency or morality, a person who, in the opinion of the Court is under eighteen years of age is called as a witness, the Court may direct that all or any persons, not being members or officers of the Court, or parties to the case or their advocates, or persons otherwise directly concerned in the case, shall be excluded from the Court during the taking of the evidence of that witness.
7. Power to clear court Where in any proceedings in relation to an offence against, or any conduct contrary to, decency or morality, a person who, in the opinion of the Court is under eighteen years of age is called as a witness, the Court may direct that all or any persons, not being members or officers of the Court, or parties to the case or their advocates, or persons otherwise directly concerned in the case, shall be excluded from the Court during the taking of the evidence of that witness.
Source: Kenya Law