def _apply_st(self, doc_loader, **kwargs):
udf = self.udf_class(**self.udf_init_kwargs)<EOL>for doc in doc_loader:<EOL><INDENT>if self.pb is not None:<EOL><INDENT>self.pb.update(<NUM_LIT:1>)<EOL><DEDENT>udf.session.add_all(y for y in udf.apply(doc, **kwargs))<EOL><DEDENT>udf.session.commit()<EOL>
Run the UDF single-threaded, optionally with progress bar