docs: def tospark(self, engine=None):
          """
          Convert to spark mode.
          """
          from thunder.series.readers import fromarray
  
          if self.mode == 'spark':
              logging.getLogger('thunder').warn('images already in local mode')
              pass
  
          if engine is None:
              raise ValueError('Must provide SparkContext')
  
          return fromarray(self.toarray(), index=self.index, labels=self.labels, engine=engine)