Well, I think example 2 provides more simplicity when you need to add the same module using for loop.
Let me know if there are other use cases!
for l in range(3):
     self.add_module(f'networkA_{l}'}
     self.add_module(f'networkB_{l}'}