def on_generation_assignment(cls, generation):
        """Callback that runs on each assignment. Updates assignor's generation id.

        Arguments:
          generation: generation id
        """
        log.debug("On generation assignment: generation={}".format(generation))
        cls.generation = generation
Callback that runs on each assignment. Updates assignor's generation id.

        Arguments:
          generation: generation id
        
kafka/coordinator/assignors/sticky/sticky_assignor.py