class_docstr: This class manages the coordination process with the consumer coordinator.
code: def _on_join_prepare(self, generation, member_id):
      # commit offsets prior to rebalance if auto-commit enabled
      self._maybe_auto_commit_offsets_sync()
  
      # execute the user's callback before rebalance
      log.info(
          "Revoking previously assigned partitions %s for group %s",
          self._subscription.assigned_partitions(),
          self.group_id,
      )
      if self._subscription.listener:
          try:
              revoked = set(self._subscription.assigned_partitions())
              self._subscription.listener.on_partitions_revoked(revoked)
          except Exception:
              log.exception(
                  "User provided subscription listener %s"
                  " for group %s failed on_partitions_revoked",
                  self._subscription.listener,
                  self.group_id,
              )
  
      self._is_leader = False
      self._subscription.reset_group_subscription()
  
imports: from __future__ import absolute_import, division
  import collections
  import copy
  import functools
  import logging
  import time
  from kafka.vendor import six
  from kafka.coordinator.base import BaseCoordinator, Generation
  from kafka.coordinator.assignors.range import RangePartitionAssignor
  from kafka.coordinator.assignors.roundrobin import RoundRobinPartitionAssignor
  from kafka.coordinator.assignors.sticky.sticky_assignor import StickyPartitionAssignor
  from kafka.coordinator.protocol import ConsumerProtocol
  import kafka.errors
  from kafka.future import Future
  from kafka.metrics import AnonMeasurable
  from kafka.metrics.stats import Avg, Count, Max, Rate
  from kafka.protocol.commit import OffsetCommitRequest, OffsetFetchRequest
  from kafka.structs import OffsetAndMetadata, TopicPartition
  from kafka.util import WeakMethod
label_desc: Use image node_id 13 for calling the ConsumerCoordinator obj's underlying member method code with example usage: obj._on_join_prepare(generation, member_id) without return types