What do you mean "iterating over edge types". I thought it is to add comments to explain validTable.