private static Map<SystemStreamPartition, TaskName> getPreviousSSPToTaskMapping(GrouperMetadata grouperMetadata,
      Set<SystemStreamPartition> broadcastSystemStreamPartitions) {
    Map<SystemStreamPartition, TaskName> sspToTaskMapping = new HashMap<>();
    Map<TaskName, List<SystemStreamPartition>> previousTaskToSSPAssignment = grouperMetadata.getPreviousTaskToSSPAssignment();
    previousTaskToSSPAssignment.forEach((taskName, systemStreamPartitions) -> {
      systemStreamPartitions.forEach(systemStreamPartition -> {
        if (!broadcastSystemStreamPartitions.contains(systemStreamPartition)) {
          sspToTaskMapping.put(systemStreamPartition, taskName);
        }
      });
    });
    return sspToTaskMapping;
  }
Computes a mapping from the {@link SystemStreamPartition} to {@link TaskName} using the provided {@param grouperMetadata}
@param grouperMetadata the grouper context that contains relevant historical metadata about the job.
@return a mapping from {@link SystemStreamPartition} to {@link TaskName}.
samza-core/src/main/java/org/apache/samza/container/grouper/stream/SSPGrouperProxy.java