remove attribute groups items .
        ** attributegroupitems : a list of items, of the form:
            ```{
                    'attr_id'    : X,
                    'group_id'   : Y,
                    'network_id' : Z,
               }```
425301
def delete_attribute_group_items(attributegroupitems, **kwargs):

    


    user_id=kwargs.get('user_id')

    log.info("Deleting %s attribute group items", len(attributegroupitems))

    #if there area attributegroupitems from different networks, keep track of those
    #networks to ensure the user actually has permission to remove the items.
    network_lookup = {}

    if not isinstance(attributegroupitems, list):
        raise HydraError("Cannpt add attribute group items. Attributegroupitems must be a list")

    #'agi' = shorthand for 'attribute group item'
    for agi in attributegroupitems:

        network_i = network_lookup.get(agi.network_id)

        if network_i is None:
            network_i = _get_network(agi.network_id)
            network_lookup[agi.network_id] = network_i

        network_i.check_write_permission(user_id)

        agi_i = db.DBSession.query(AttrGroupItem).filter(AttrGroupItem.network_id == agi.network_id,
                                                 AttrGroupItem.group_id == agi.group_id,
                                                 AttrGroupItem.attr_id  == agi.attr_id).first()

        if agi_i is not None:
            db.DBSession.delete(agi_i)

    db.DBSession.flush()

    log.info("Attribute group items deleted")

    return 'OK'
3705
function removeAllSwatchGroups() {
  for (var i = 0; i < doc.swatchGroups.length; i++) {
    doc.swatchGroups[i].remove();
  }
}
677308
def remove(self, item):
        ''
        i = self.index(item)
        del self._keys[i]
        del self._items[i]
411540
protected function purgeAttributes()
    {
        $attributes = $this->getPurgeAttributes();

        if ( ! empty($attributes) )
        {
            foreach ( $attributes as $attribute )
            {
                unset($this->attributes[$attribute]);
            }
        }
    }
603459
def group_remove(groupname,
                 user=None,
                 host=None,
                 port=None,
                 maintenance_db=None,
                 password=None,
                 runas=None):
    '''
    
    '''
    return _role_remove(groupname,
                        user=user,
                        host=host,
                        port=port,
                        maintenance_db=maintenance_db,
                        password=password,
                        runas=runas)
1199554
def remove(self, item):
        
        if item not in self.__dict__[self.ATTRIBUTES].keys():
            raise AttributeError('%s does not exist' % item)
        delattr(self, item)
111843
def detach_securitygroup_components(self, group_id, component_ids):
        
        return self.security_group.detachNetworkComponents(component_ids,
                                                           id=group_id)
607599
def remove_from_group(self, devices):
        """"""
        ids = {d.id for d in self.devices_in_group()}
        ids.difference_update(self._device_ids(devices))
        self._set_group(ids)
211463
def remove(self, items):
        """"""
        items = coerce_to_list(items)
        new_options = {k: v for k, v in self.options.items() if v not in items}
        self.widget.options = new_options
        self.widget.param.trigger('options')
989182
def delete_items_from_dict(d, to_delete):
    
    if not isinstance(to_delete, list):
        to_delete = [to_delete]
    if isinstance(d, dict):
        for single_to_delete in set(to_delete):
            if single_to_delete in d.values():
                for k, v in d.copy().items():
                    if v == single_to_delete:
                        del d[k]
        for k, v in d.items():
            delete_items_from_dict(v, to_delete)
    elif isinstance(d, list):
        for i in d:
            delete_items_from_dict(i, to_delete)
    return remove_none(d)
393982
def clear_attributes(self):
        
        self._attrs = {} # removes all attr
        for name, attr_field in six.iteritems(self._ftype.attrs):
            self._attrs[name] = []
1259483
def get_network_attributegroup_items(network_id, **kwargs):
    

    user_id=kwargs.get('user_id')


    net_i = _get_network(network_id)

    net_i.check_read_permission(user_id)

    group_items_i = db.DBSession.query(AttrGroupItem).filter(
                                    AttrGroupItem.network_id==network_id).all()

    return group_items_i
1084736
public void onItemGroup(ItemGroup<?> group) {
        for (Item i : group.getItems())
            if (i.hasPermission(Item.READ))
                onItem(i);
    }
1119527
def removeNestedGroups(node):
    
    global _num_elements_removed
    num = 0

    groupsToRemove = []
    # Only consider <g> elements for promotion if this element isn't a <switch>.
    # (partial fix for bug 594930, required by the SVG spec however)
    if not (node.nodeType == Node.ELEMENT_NODE and node.nodeName == 'switch'):
        for child in node.childNodes:
            if child.nodeName == 'g' and child.namespaceURI == NS['SVG'] and len(child.attributes) == 0:
                # only collapse group if it does not have a title or desc as a direct descendant,
                for grandchild in child.childNodes:
                    if grandchild.nodeType == Node.ELEMENT_NODE and grandchild.namespaceURI == NS['SVG'] and \
                            grandchild.nodeName in ['title', 'desc']:
                        break
                else:
                    groupsToRemove.append(child)

    for g in groupsToRemove:
        while g.childNodes.length > 0:
            g.parentNode.insertBefore(g.firstChild, g)
        g.parentNode.removeChild(g)
        _num_elements_removed += 1
        num += 1

    # now recurse for children
    for child in node.childNodes:
        if child.nodeType == Node.ELEMENT_NODE:
            num += removeNestedGroups(child)
    return num
391986
def removeAttribute(self, attrName):
        '''
            

        '''
        attrName = attrName.lower()

        # Delete provided attribute name ( #attrName ) from attributes map
        try:
            del self._attributes[attrName]
        except KeyError:
            pass
960635
def group_items(items, opts = {})
      default_opts          = {:group_size => 10, :header => proc { |c| c.to_s[0, 1].upcase }}
      opts                  = default_opts.merge(opts)
      group_size            = opts[:group_size]
      header                = opts[:header]

      items                 = items.sort_by &header
      items_group_by_header = items.group_by &header

      items_by_headers      = []
      merge_headers         = []
      merge_items           = []

      items_group_by_header.sort.each do |header, items|
        merge_headers << header
        merge_items.concat items
        if merge_items.length >= group_size
          items_by_headers << [merge_headers, merge_items]
          merge_headers = []
          merge_items   = []
        end
      end

      if merge_items.length > 0
        items_by_headers << [merge_headers, merge_items]
      end
      items_by_headers
    end
919800
def _delete_security_groups(self):
    
    group_names = self._get_all_group_names_for_cluster()
    for group in group_names:
      self.ec2.delete_security_group(group)