Return a network with that id or None.

def get_network_by_id(self, net_id):
        """Return a network with that id or None."""

        for elem in self.networks:
            if elem.id == net_id:
                return elem
        return None