'returns primary/named networks or node from any net'

def __getitem__(self, key):

    if (key in self.nameToNet):
        return self.nameToNet[key]
    for net in self.nets:
        if (key in net):
            return net[key]
