class_docstr: Kafka event broker.
class_docstr_tok: ["Kafka","event","broker","."]
docstr: Verifies connection with Kafka.
  
  Raises:
      KafkaException: if Kafka is disconnected.
docstr_tok: ["Verifies","connection","with","Kafka",".","Raises",":","KafkaException",":","if","Kafka","is","disconnected","."]
code: def _check_kafka_connection(self) -> None:
      """Verifies connection with Kafka.
  
      Raises:
          KafkaException: if Kafka is disconnected.
      """
      if self.producer is not None:
          self.producer.list_topics(timeout=5)
  
imports: import asyncio
  import os
  import json
  import logging
  import structlog
  import threading
  from asyncio import AbstractEventLoop
  from typing import Any, Text, List, Optional, Union, Dict, TYPE_CHECKING
  import time
  from rasa.core.brokers.broker import EventBroker
  from rasa.core.exceptions import KafkaProducerInitializationError
  from rasa.shared.utils.io import DEFAULT_ENCODING
  from rasa.utils.endpoints import EndpointConfig
  import rasa.shared.utils.common
label_desc: Use image node_id 3 for calling the KafkaEventBroker obj's underlying member method code with example usage: obj._check_kafka_connection() without return types