class_docstr: Kafka event broker.
class_docstr_tok: ["Kafka","event","broker","."]
docstr: Polls the producer for events.
  
  Required to trigger the on_delivery callback passed to produce method.
docstr_tok: ["Polls","the","producer","for","events",".","Required","to","trigger","the","on_delivery","callback","passed","to","produce","method","."]
code: def _poll_loop(self) -> None:
      """Polls the producer for events.
  
      Required to trigger the on_delivery callback passed to produce method.
      """
      if self.producer is not None:
          while not self._cancelled:
              self.producer.poll(0.1)
  
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 9 for calling the KafkaEventBroker obj's underlying member method code with example usage: obj._poll_loop() without return types