Remove one or more nodes

        :param string lb_id:  Balancer id

        :param list node_ids:  List of node ids
503044
def remove_lb_nodes(self, lb_id, node_ids):
        
        log.info("Removing load balancer nodes %s" % node_ids)
        for node_id in node_ids:
            self._request('delete', '/loadbalancers/%s/nodes/%s' % (lb_id, node_id))
922443
def _remove_node(self, node_name):
        
        try:
            self._nodes.pop(node_name)
        except Exception:
            raise KeyError('node \'{}\' not found, available nodes: {}'.format(
                node_name, self._nodes.keys()))
        else:
            self._create_ring(self._nodes)
1241770
def strip_ids(ids, ids_to_strip):
  """"""
  ids = list(ids)
  while ids and ids[-1] in ids_to_strip:
    ids.pop()
  return ids
1315946
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/pool/%s/', ids)

        return super(ApiPool, self).delete(url)
622114
def removeUnreferencedIDs(referencedIDs, identifiedElements):
    
    global _num_ids_removed
    keepTags = ['font']
    num = 0
    for id in identifiedElements:
        node = identifiedElements[id]
        if id not in referencedIDs and node.nodeName not in keepTags:
            node.removeAttribute('id')
            _num_ids_removed += 1
            num += 1
    return num
156212
def _expand_balancer(lb):
    '''
    
    '''
    ret = {}
    ret.update(lb.__dict__)
    hc = ret['extra']['healthchecks']
    ret['extra']['healthchecks'] = []
    for item in hc:
        ret['extra']['healthchecks'].append(_expand_item(item))

    fwr = ret['extra']['forwarding_rule']
    tp = ret['extra']['forwarding_rule'].targetpool
    reg = ret['extra']['forwarding_rule'].region
    ret['extra']['forwarding_rule'] = {}
    ret['extra']['forwarding_rule'].update(fwr.__dict__)
    ret['extra']['forwarding_rule']['targetpool'] = tp.name
    ret['extra']['forwarding_rule']['region'] = reg.name

    tp = ret['extra']['targetpool']
    hc = ret['extra']['targetpool'].healthchecks
    nodes = ret['extra']['targetpool'].nodes
    region = ret['extra']['targetpool'].region
    zones = ret['extra']['targetpool'].region.zones

    ret['extra']['targetpool'] = {}
    ret['extra']['targetpool'].update(tp.__dict__)
    ret['extra']['targetpool']['region'] = _expand_item(region)
    ret['extra']['targetpool']['nodes'] = []
    for n in nodes:
        ret['extra']['targetpool']['nodes'].append(_expand_node(n))
    ret['extra']['targetpool']['healthchecks'] = []
    for hci in hc:
        ret['extra']['targetpool']['healthchecks'].append(hci.name)
    ret['extra']['targetpool']['region']['zones'] = []
    for z in zones:
        ret['extra']['targetpool']['region']['zones'].append(z.name)
    return ret
1049469
def __delete_node_links(self, node):
        
        for link in list(self._links.values()):
            if node in link.nodes:
                yield from self.delete_link(link.id, force_delete=True)
672263
def delete_node(manager, handle_id):
    
    q = """
        MATCH (n:Node {handle_id: {handle_id}})
        OPTIONAL MATCH (n)-[r]-()
        DELETE n,r
        """
    with manager.session as s:
        s.run(q, {'handle_id': handle_id})
    return True
908957
protected ArrayDBIDs affectedRkNN(List<? extends Collection<DoubleDBIDPair>> extract, DBIDs remove) {
    HashSetModifiableDBIDs ids = DBIDUtil.newHashSet();
    for(Collection<DoubleDBIDPair> drps : extract) {
      for(DoubleDBIDPair drp : drps) {
        ids.add(drp);
      }
    }
    ids.removeDBIDs(remove);
    // Convert back to array
    return DBIDUtil.newArray(ids);
  }
734857
def delete_node(node_id, purge_data,**kwargs):
    
    user_id = kwargs.get('user_id')
    try:
        node_i = db.DBSession.query(Node).filter(Node.id == node_id).one()
    except NoResultFound:
        raise ResourceNotFoundError("Node %s not found"%(node_id))

    group_items = db.DBSession.query(ResourceGroupItem).filter(
                                        ResourceGroupItem.node_id==node_id).all()
    for gi in group_items:
        db.DBSession.delete(gi)

    if purge_data == 'Y':
        _purge_datasets_unique_to_resource('NODE', node_id)

    log.info("Deleting node %s, id=%s", node_i.name, node_id)

    node_i.network.check_write_permission(user_id)
    db.DBSession.delete(node_i)
    db.DBSession.flush()
    return 'OK'
68700
def delete_node_1ton(node_list, begin, node, end):  # type: ([],LinkedNode, LinkedNode, LinkedNode)->[]
        
        if end is None:
            assert end is not None
            end = node.successor
        elif not isinstance(end, list):
            end = [end]

        if any(e_.in_or_out for e_ in end):
            # if the end is output node, the output name will be kept to avoid the model output name updating.
            begin.out_redirect(node.single_input, node.single_output)
        else:
            for ne_ in end:
                target_var_name = node.single_input
                # since the output info never be updated, except the final.
                assert target_var_name in begin.output.values()
                ne_.in_redirect(node.single_output, target_var_name)

        begin.successor = [v_ for v_ in begin.successor if v_ != node] + node.successor
        for ne_ in end:
            ne_.precedence = [begin if v_ == node else v_ for v_ in ne_.precedence]

        node_list.remove(node)
        return node_list
812071
def remove_lp(self,layer):
        
        for this_node in self.node.findall('linguisticProcessors'):
            if this_node.get('layer') == layer:
                self.node.remove(this_node)
                break
21245
def remove_timex3s(self, list_timex_ids):
        
        nodes_to_remove = set()
        for timex in self:
            if timex.get_id() in list_timex_ids:
                nodes_to_remove.add(timex.get_node())
                #for removing the previous comment (expected the layer will look like termlayer)
                prv = timex.get_node().getprevious()
                if prv is not None:
                    nodes_to_remove.add(prv)

        for node in nodes_to_remove:
            self.node.remove(node)
1182065
def get_nodes_from_ids(id_list: Iterable[str]) -> List[Node]:
    
    node_list = []

    for result in get_scigraph_nodes(id_list):
        if 'lbl' in result:
            label = result['lbl']
        else:
            label = None  # Empty string or None?
        node_list.append(Node(result['id'], label))

    return node_list
5228
def unlisten_to_node(self, id_):
        
        id_pubsub = _pubsub_key(id_)

        if id_pubsub in self._listening_to:
            del self._listening_to[id_pubsub]
            self.toredis.unsubscribe(id_pubsub)

            parent = json_decode(r_client.get(id_)).get('parent', None)
            if parent is not None:
                r_client.srem(_children_key(parent), id_)
            r_client.srem(self.group_children, id_)

            return id_
1142520
def prune_clade(self, node_id):
        """"""
        to_del_nodes = [node_id]
        while bool(to_del_nodes):
            node_id = to_del_nodes.pop(0)
            self._flag_node_as_del_and_del_in_by_target(node_id)
            ebsd = self._edge_by_source.get(node_id)
            if ebsd is not None:
                child_edges = list(ebsd.values())
                to_del_nodes.extend([i['@target'] for i in child_edges])
                del self._edge_by_source[
                    node_id]
78254
def remove(self, db):
        
        assert self.collection
        assert self.id

        db[self.collection].remove(self.id)