code: def _apply_st(self, doc_loader, **kwargs):
          
          udf = self.udf_class(**self.udf_init_kwargs)
  
          # Run single-thread
          for doc in doc_loader:
              if self.pb is not None:
                  self.pb.update(1)
  
              udf.session.add_all(y for y in udf.apply(doc, **kwargs))
  
          # Commit session and close progress bar if applicable
          udf.session.commit()
docs: Run the UDF single-threaded, optionally with progress bar