docs: def with_exit_condition(self, exit_condition: Optional[bool]=True) -> 'MonitorTask':
          """
          Sets the flag indicating that the task should also run after the optimisation is ended.
          """
          self._exit_condition = exit_condition
          return self