def connected(self):
        """Return True iff the coordinator node is connected"""
        with self._lock:
            return self.coordinator_id is not None and self._client.connected(self.coordinator_id)
Return True iff the coordinator node is connected
kafka/coordinator/base.py