def _keep_alive(self, n_pending_tasks, n_unique_pending):
        if not self._config.keep_alive:
            return False
        elif self._assistant:
            return True
        else:
            return n_pending_tasks and (n_unique_pending or not self._config.count_uniques)
Returns true if a worker should stay alive given.
dataset/ETHPy150Open spotify/luigi/luigi/worker.py/Worker._keep_alive