yes, probably you are talking about Cai-furrer-Immerman thm. but that is not the main thing, Each of $F , E$ can be divided as described. If $F \simeq E$, Then $E, F$ can have maximum
$O( \frac {m^{log_2(m)}} { 2^{\sum log_2(m)} })$ different matices following above division process. So, we devide $F$ as above and try all possible matrices of $E$,following above division process. is this unclear to you?