def _delete(self, pos, idx):
_lists = self._lists<EOL>_maxes = self._maxes<EOL>_index = self._index<EOL>_lists_pos = _lists[pos]<EOL>del _lists_pos[idx]<EOL>self._len -= <NUM_LIT:1><EOL>len_lists_pos = len(_lists_pos)<EOL>if len_lists_pos > self._half:<EOL><INDENT>_maxes[pos] = _lists_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(_lists) > <NUM_LIT:1>:<EOL><INDENT>if not pos:<EOL><INDENT>pos += <NUM_LIT:1><EOL><DEDENT>prev = pos - <NUM_LIT:1><EOL>_lists[prev].extend(_lists[pos])<EOL>_maxes[prev] = _lists[prev][-<NUM_LIT:1>]<EOL>del _lists[pos]<EOL>del _maxes[pos]<EOL>del _index[:]<EOL>self._expand(prev)<EOL><DEDENT>elif len_lists_pos:<EOL><INDENT>_maxes[pos] = _lists_pos[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>del _lists[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.