def _delete(self, pos, idx):
_lists = self._lists<EOL>_keys = self._keys<EOL>_maxes = self._maxes<EOL>_index = self._index<EOL>keys_pos = _keys[pos]<EOL>lists_pos = _lists[pos]<EOL>del keys_pos[idx]<EOL>del lists_pos[idx]<EOL>self._len -= <NUM_LIT:1><EOL>len_keys_pos = len(keys_pos)<EOL>if len_keys_pos > self._half:<EOL><INDENT>_maxes[pos] = keys_pos[-<NUM_LIT:1>]<EOL>if _index:<EOL><INDENT>child = self._offset + pos<EOL>while child > <NUM_LIT:0>:<EOL><INDENT>_index[child] -= <NUM_LIT:1><EOL>child = (child - <NUM_LIT:1>) >> <NUM_LIT:1><EOL><DEDENT>_index[<NUM_LIT:0>] -= <NUM_LIT:1><EOL><DEDENT><DEDENT>elif len(_keys) > <NUM_LIT:1>:<EOL><INDENT>if not pos:<EOL><INDENT>pos += <NUM_LIT:1><EOL><DEDENT>prev = pos - <NUM_LIT:1><EOL>_keys[prev].extend(_keys[pos])<EOL>_lists[prev].extend(_lists[pos])<EOL>_maxes[prev] = _keys[prev][-<NUM_LIT:1>]<EOL>del _lists[pos]<EOL>del _keys[pos]<EOL>del _maxes[pos]<EOL>del _index[:]<EOL>self._expand(prev)<EOL><DEDENT>elif len_keys_pos:<EOL><INDENT>_maxes[pos] = keys_pos[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>del _lists[pos]<EOL>del _keys[pos]<EOL>del _maxes[pos]<EOL>del _index[:]<EOL><DEDENT>
Delete the item at the given (pos, idx).

Combines lists that are less than half the load level.

Updates the index when the sublist length is more than half the load
level. This requires decrementing the nodes in a traversal from the leaf
node to the root. For an example traversal see self._loc.