code: def _pop_key(self, key, has_default):
  		
  		try:
  			index, value = self._dict.pop(key)
  		except KeyError:
  			if has_default:
  				return None, None
  			else:
  				raise
  		key2, value2 = self._list.pop(index)
  		assert key is key2
  		assert value is value2
  
  		return index, value
docs: Remove an element by key.