code: def _init_current_assignments(self, members):
      # we need to process subscriptions' user data with each consumer's reported generation in mind
      # higher generations overwrite lower generations in case of a conflict
      # note that a conflict could exists only if user data is for different generations
  
      # for each partition we create a map of its consumers by generation
      sorted_partition_consumers_by_generation = {}
      for consumer, member_metadata in six.iteritems(members):
          for partitions in member_metadata.partitions:
              if partitions in sorted_partition_consumers_by_generation:
                  consumers = sorted_partition_consumers_by_generation[
                      partitions
                  ]
                  if (
                      member_metadata.generation
                      and member_metadata.generation in consumers
                  ):
                      # same partition is assigned to two consumers during the same rebalance.
                      # log a warning and skip this record
                      log.warning(
                          "Partition {} is assigned to multiple consumers "
                          "following sticky assignment generation {}.".format(
                              partitions, member_metadata.generation
                          )
                      )
                  else:
                      consumers[member_metadata.generation] = consumer
              else:
                  sorted_consumers = {
                      member_metadata.generation: consumer
                  }
                  sorted_partition_consumers_by_generation[
                      partitions
                  ] = sorted_consumers
  
      # previous_assignment holds the prior ConsumerGenerationPair (before current) of each partition
      # current and previous consumers are the last two consumers of each partition in the above sorted map
      for partitions, consumers in six.iteritems(
          sorted_partition_consumers_by_generation
      ):
          generations = sorted(consumers.keys(), reverse=True)
          self.current_assignment[consumers[generations[0]]].append(
              partitions
          )
          # now update previous assignment if any
          if len(generations) > 1:
              self.previous_assignment[
                  partitions
              ] = ConsumerGenerationPair(
                  consumer=consumers[generations[1]],
                  generation=generations[1],
              )
  
      self.is_fresh_assignment = len(self.current_assignment) == 0
  
      for consumer_id, partitions in six.iteritems(
          self.current_assignment
      ):
          for partition in partitions:
              self.current_partition_consumer[partition] = consumer_id
  
imports: import logging
  from collections import defaultdict, namedtuple
  from copy import deepcopy
  from kafka.cluster import ClusterMetadata
  from kafka.coordinator.assignors.abstract import AbstractPartitionAssignor
  from kafka.coordinator.assignors.sticky.partition_movements import PartitionMovements
  from kafka.coordinator.assignors.sticky.sorted_set import SortedSet
  from kafka.coordinator.protocol import ConsumerProtocolMemberMetadata, ConsumerProtocolMemberAssignment
  from kafka.coordinator.protocol import Schema
  from kafka.protocol.struct import Struct
  from kafka.protocol.types import String, Array, Int32
  from kafka.structs import TopicPartition
  from kafka.vendor import six
label_desc: Use image node_id 6 for calling the StickyAssignmentExecutor obj's underlying member method code with example usage: obj._init_current_assignments(members) without return types