code: def exhaust(self, index = None):
          
          if self._exhausted:
              return
          if index is None:
              ind_range = itertools.count(len(self))
          else:
              ind_range = range(len(self), index + 1)
  
          for ind in ind_range:
              try:
                  self._data.append(next(self._iterator))
              except StopIteration: #iterator is fully exhausted
                  self._exhausted = True
                  break
docs: Exhaust the iterator generating this LazyList's values.
          if index is None, this will exhaust the iterator completely.
          Otherwise, it will iterate over the iterator until either the list
          has a value for index or the iterator is exhausted.