code: def cache(self, delete_lineage=False):
          
          if len(self._lineage) == 0 or self._lineage[-1] == transformations.CACHE_T:
              if not isinstance(self._base_sequence, list):
                  self._base_sequence = list(self._base_sequence)
                  self._lineage.apply(transformations.CACHE_T)
          else:
              self._base_sequence = list(self._evaluate())
              self._lineage.apply(transformations.CACHE_T)
          if delete_lineage:
              self._lineage = Lineage(engine=self.engine)
          return self
docs: Caches the result of the Sequence so far. This means that any functions applied on the
          pipeline before cache() are evaluated, and the result is stored in the Sequence. This is
          primarily used internally and is no more helpful than to_list() externally. delete_lineage
          allows for cache() to be used in internal initialization calls without the caller having
          knowledge of the internals via the lineage
  
          :param delete_lineage: If set to True, it will cache then erase the lineage