def _get_unused_nets(self, vms_to_stop):
vm_names = [vm.name() for vm in vms_to_stop]<EOL>unused_nets = set()<EOL>for vm in vms_to_stop:<EOL><INDENT>unused_nets = unused_nets.union(vm.nets())<EOL><DEDENT>for vm in self._vms.values():<EOL><INDENT>if not vm.running() or vm.name() in vm_names:<EOL><INDENT>continue<EOL><DEDENT>for net in vm.nets():<EOL><INDENT>unused_nets.discard(net)<EOL><DEDENT><DEDENT>nets = [self._nets[net] for net in unused_nets]<EOL>return nets<EOL>
Return a list of nets that used only by the vms in vms_to_stop
Args:
    vms_to_stop (list of str): The names of the requested vms
Returns
    list of virt.Network: net objects that used only by
        vms in vms_to_stop
Raises:
    utils.LagoUserException: If a vm name doesn't exist