def __init__(self, iterable=None, key=None):
self._key = key<EOL>if not hasattr(self, '<STR_LIT>'):<EOL><INDENT>self._set = set()<EOL><DEDENT>_set = self._set<EOL>self.isdisjoint = _set.isdisjoint<EOL>self.issubset = _set.issubset<EOL>self.issuperset = _set.issuperset<EOL>if key is None:<EOL><INDENT>self._list = SortedList(self._set)<EOL><DEDENT>else:<EOL><INDENT>self._list = SortedListWithKey(self._set, key=key)<EOL><DEDENT>_list = self._list<EOL>self.bisect_left = _list.bisect_left<EOL>self.bisect = _list.bisect<EOL>self.bisect_right = _list.bisect_right<EOL>self.index = _list.index<EOL>self.irange = _list.irange<EOL>self.islice = _list.islice<EOL>self._reset = _list._reset  <EOL>if key is not None:<EOL><INDENT>self.bisect_key_left = _list.bisect_key_left<EOL>self.bisect_key_right = _list.bisect_key_right<EOL>self.bisect_key = _list.bisect_key<EOL>self.irange_key = _list.irange_key<EOL><DEDENT>if iterable is not None:<EOL><INDENT>self._update(iterable)<EOL><DEDENT>
A `SortedSet` provides the same methods as a `set`.  Additionally, a
`SortedSet` maintains its items in sorted order, allowing the
`SortedSet` to be indexed.

An optional *iterable* provides an initial series of items to populate
the `SortedSet`.

An optional *key* argument defines a callable that, like the `key`
argument to Python's `sorted` function, extracts a comparison key from
each set item. If no function is specified, the default compares the
set items directly.