I don't think `flatten_networks` is needed now that we have some better concepts like forms, partitioned graphs, etc. @JoeyT1994 seems like you already started removing it's usage in the tests in #162?