def METHOD_NAME(profiler, corpus, meta_var, model_name, output_mode, state):
    ticks = iter(np.linspace(0., 100.,
                             int(np.ceil(len(corpus) / profiler.BATCH_SIZE) + 1)))
    def advance():
        if state.is_interruption_requested():
            raise InterruptedError
        state.set_progress_value(next(ticks))
    out = profiler.transform(corpus, meta_var, model_name, output_mode,
                             on_advance=advance)
    return out