code: def update(self, iterable):
          
          _maxes, _lists, _keys = self._maxes, self._lists, self._keys
          values = sorted(iterable, key=self._key)
  
          if _maxes:
              if len(values) * 4 >= self._len:
                  values.extend(chain.from_iterable(_lists))
                  values.sort(key=self._key)
                  self._clear()
              else:
                  _add = self.add
                  for val in values:
                      _add(val)
                  return
  
          _load, _index = self._load, self._index
          _lists.extend(values[pos:(pos + _load)]
                        for pos in range(0, len(values), _load))
          _keys.extend(list(map(self._key, _list)) for _list in _lists)
          _maxes.extend(sublist[-1] for sublist in _keys)
          self._len = len(values)
          del _index[:]
docs: Update the list by adding all elements from *iterable*.