code: def toseries(self):
          
          from thunder.series.series import Series
  
          if self.mode == 'spark':
              values = self.values.values_to_keys(tuple(range(1, len(self.shape)))).unchunk()
  
          if self.mode == 'local':
              values = self.values.unchunk()
              values = rollaxis(values, 0, values.ndim)
  
          return Series(values)
docs: Converts blocks to series.