Mixed ANOVA with replication but without repeats

Hi,

How do you calculate a mixed ANOVA model with replication but with no repeats?
For example, the fixed effect is gender and the random effect is class,
But each student may go only to one class, so without repeats

It seems that ezANOVA and anova_test deal only with mixed ANOVA with repeats ( wid)
It expects the same subject over the random effect.