code: def remove(self, val):
          
          _maxes = self._maxes
  
          if not _maxes:
              raise ValueError('{0} not in list'.format(repr(val)))
  
          pos = bisect_left(_maxes, val)
  
          if pos == len(_maxes):
              raise ValueError('{0} not in list'.format(repr(val)))
  
          _lists = self._lists
          idx = bisect_left(_lists[pos], val)
          if _lists[pos][idx] == val:
              self._delete(pos, idx)
          else:
              raise ValueError('{0} not in list'.format(repr(val)))
docs: Remove first occurrence of *val*.
  
          Raises ValueError if *val* is not present.