def bisect_key_left(self, key):
_maxes = self._maxes<EOL>if not _maxes:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>pos = bisect_left(_maxes, key)<EOL>if pos == len(_maxes):<EOL><INDENT>return self._len<EOL><DEDENT>idx = bisect_left(self._keys[pos], key)<EOL>return self._loc(pos, idx)<EOL>
Similar to the *bisect* module in the standard library, this returns an
appropriate index to insert a value with a given *key*. If values with
*key* are already present, the insertion point will be before (to the
left of) any existing entries.