If you define a new class which represents a Network, you could get rid of this code. 

In cases like this, defining a class is also generally better than using a dict. Dict enforces no structure which means it's fragile and it also makes it harder for the end user to know what to expect.

Then you can also modify `ex_list_networks` to return a list of instances of this class.