def close(self, timeout_ms=None):
        """Close the coordinator, leave the current group,
        and reset local generation / member_id"""
        self._close_heartbeat_thread(timeout_ms=timeout_ms)
        if self.config['api_version'] >= (0, 9):
            self.maybe_leave_group(timeout_ms=timeout_ms)
Close the coordinator, leave the current group,
        and reset local generation / member_id
kafka/coordinator/base.py