private void closeRunningTasksDirty() {
        final Set<Task> allTask = tasks.allTasks();
        final Set<TaskId> allTaskIds = tasks.allTaskIds();
        maybeLockTasks(allTaskIds);
        for (final Task task : allTask) {
            // Even though we've apparently dropped out of the group, we can continue safely to maintain our
            // standby tasks while we rejoin.
            if (task.isActive()) {
                closeTaskDirty(task, true);
            }
        }
        maybeUnlockTasks(allTaskIds);
    }
Closes active tasks as zombies, as these partitions have been lost and are no longer owned.
NOTE this method assumes that when it is called, EVERY task/partition has been lost and must
be closed as a zombie.

@throws TaskMigratedException if the task producer got fenced (EOS only)
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java