code: def after_each_callback(eng, callback_func, obj):
          
          obj.callback_pos = eng.state.callback_pos
          obj.extra_data["_last_task_name"] = callback_func.__name__
          task_history = get_task_history(callback_func)
          if "_task_history" not in obj.extra_data:
              obj.extra_data["_task_history"] = [task_history]
          else:
              obj.extra_data["_task_history"].append(task_history)
docs: Take action after every WF callback.