def __contains__(self, val):
_maxes = self._maxes<EOL>if not _maxes:<EOL><INDENT>return False<EOL><DEDENT>pos = bisect_left(_maxes, val)<EOL>if pos == len(_maxes):<EOL><INDENT>return False<EOL><DEDENT>_lists = self._lists<EOL>idx = bisect_left(_lists[pos], val)<EOL>return _lists[pos][idx] == val<EOL>
Return True if and only if *val* is an element in the list.