Removes ``member`` from the set ``key`` if ``other_key`` does not
        exist (i.e. is empty). Returns the number of removed elements (0 or 1).
515567
def srem_if_not_exists(self, key, member, other_key, client=None):
        
        return self._srem_if_not_exists(
            keys=[key, other_key],
            args=[member],
            client=client)
351944
def remove(self, member):
        
        if member not in self:
            return False
        score = self._members[member]
        score_index = bisect_left(self._scores, (score, member))
        del self._scores[score_index]
        del self._members[member]
        return True
1095814
def remove_empties
      self.keys.each do |key|
        if (self[key].kind_of?(Array) && self[key].empty?) || self[key].nil?
          self.delete(key)
        end
      end
    end
1060072
public long remove(K key)
  {
    if (key == null) {
      long old = _nullValue;
      _nullValue = NULL;
      return old;
    }

    int hash = key.hashCode() & _mask;

    while (true) {
      Object mapKey = _keys[hash];

      if (mapKey == null)
        return NULL;
      else if (mapKey.equals(key)) {
        _flags[hash] |= DELETED;

        _size--;

        _keys[hash] = null;

        return _values[hash];
      }

      hash = (hash + 1) & _mask;
    }
  }
734761
function(key) {
        this._removeAddsOrRemoves(this.sets.adds, key);
        this._removeAddsOrRemoves(this.sets.removes, key);
        if (this.sets.remove.indexOf(key) === -1) {
            this.sets.remove.push(key);
        }
        return this;
    }
1256127
def remove(self, element):
        
        if element not in self._counts:
            raise KeyError(element)
        elif self._counts[element] == 1:
            newc = self._counts.remove(element)
        else:
            newc = self._counts.set(element, self._counts[element] - 1)
        return PBag(newc)
655928
function(key) {
        this._removeAddsOrRemoves(this.flags.set, key);
        if (this.flags.remove.indexOf(key) === -1) {
            this.flags.remove.push(key);
        }
        return this;
    }
646554
def note_deletion(self, key):
        
        # If we'rew deleting a key we previously added, then there is no diff
        if key in self._added:
            self._added.remove(key)
        else:
            # If the deleted key was previously changed, use the original value
            if key in self._previous:
                self._deleted[key] = self._previous[key]
                del self._previous[key]
            else:
                self._deleted[key] = self._instance[key]
1168774
def remove(key)
      node = self

      while node do
        # Find index of the entry that best fits the key.
        i = node.search_key_index(key)
        if node.is_leaf?
          # This is a leaf node. Check if there is an exact match for the
          # given key and return the corresponding value or nil.
          if node.keys[i] == key
            @tree.entry_counter -= 1
            return node.remove_element(i)
          else
            return nil
          end
        end

        # Descend into the right child node to continue the search.
        node = node.children[i]
      end

      PEROBS.log.fatal 'Could not find proper node to remove from'
    end
1089215
private MutableDouble mutableRemove(E key) {
    MutableDouble md = map.remove(key);
    if (md != null) {
      totalCount -= md.doubleValue();
    }
    return md;
  }
1194943
def pop(self):
        
        if not self.items:
            raise KeyError("Set is empty")

        elem = self.items[-1]
        del self.items[-1]
        del self.map[elem]
        return elem
1231420
public void removeKey(int key) { 
    	if (key == first.value) {
    		removeMin();
    		return;
    	}
    	if (key == last.value) {
    		removeMax();
    		return;
    	}
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = removeKey(root, key);
        if (root != null) root.red = false;
    }
949113
def _remove_add_key(self, key):
        """"""
        if not hasattr(self, '_queue'):
            return  # haven't initialized yet, so don't bother
        if key in self._queue:
            self._queue.remove(key)
        self._queue.append(key)
        if self.maxsize == 0:
            return
        while len(self._queue) > self.maxsize:
            del self[self._queue[0]]
716031
def remove_from_set(set, item)
      Predictor.redis.multi do |redis|
        redis.srem(redis_key(:items, set), item)
        redis.srem(redis_key(:sets, item), set)
      end
    end
904146
def count(self, key):
        """"""
        count = 0
        pos = self.index(key, -1)
        if pos == -1:
            return count
        count += 1
        for i in range(pos+1, len(self)):
            if self[i][0] != key:
                break
            count += 1
        return count
907169
def pop(self, key=util_const.NoParam, default=util_const.NoParam):
        
        # Dictionary pop if key is specified
        if key is not util_const.NoParam:
            if default is util_const.NoParam:
                return (key, self._dict.pop(key))
            else:
                return (key, self._dict.pop(key, default))
        # Otherwise do a heap pop
        try:
            # Ammortized O(1)
            _heap = self._heap
            _dict = self._dict
            val, key = self._heappop(_heap)
            # Remove items marked for lazy deletion as they are encountered
            while key not in _dict or _dict[key] != val:
                val, key = self._heappop(_heap)
        except IndexError:
            if len(_heap) == 0:
                raise IndexError('queue is empty')
            else:
                raise
        del _dict[key]
        return key, val
673599
function zrem(key /* member-1, member-N, req */) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null
    , val = this.getKey(key, req);
  if(val === undefined) return 0;
  var deleted = val.zrem(args);
  if(val.zcard() === 0) {
    this.delKey(key, req);
  }
  return deleted;
}