class_docstr: Manages the publishing of events in a tracker store to an event broker.
  
  Attributes:
      endpoints_path: Path to the endpoints file used to configure the event
          broker and tracker store. If `None`, the default path ('endpoints.yml')
          is used.
      tracker_store: `TrackerStore` to export conversations from.
      event_broker: `EventBroker` to export conversations to.
      requested_conversation_ids: List of conversation IDs requested to be
          processed.
      minimum_timestamp: Minimum timestamp of events that are published.
          If `None`, apply no such constraint.
      maximum_timestamp: Maximum timestamp of events that are published.
          If `None`, apply no such constraint.
class_docstr_tok: ["Manages","the","publishing","of","events","in","a","tracker","store","to","an","event","broker",".","Attributes",":","endpoints_path",":","Path","to","the","endpoints","file","used","to","configure","the","event","broker","and","tracker","store",".","If","`","None","`",",","the","default","path","(","'endpoints.yml","'",")","is","used",".","tracker_store",":","`","TrackerStore","`","to","export","conversations","from",".","event_broker",":","`","EventBroker","`","to","export","conversations","to",".","requested_conversation_ids",":","List","of","conversation","IDs","requested","to","be","processed",".","minimum_timestamp",":","Minimum","timestamp","of","events","that","are","published",".","If","`","None","`",",","apply","no","such","constraint",".","maximum_timestamp",":","Maximum","timestamp","of","events","that","are","published",".","If","`","None","`",",","apply","no","such","constraint","."]
docstr: Publish `event` to a message broker with `headers`.
  
  Args:
      original_event: Serialized event to be published.
      headers: Message headers to be published if `self.event_broker` is a
          `PikaEventBroker`.
docstr_tok: ["Publish","`","event","`","to","a","message","broker","with","`","headers","`",".","Args",":","original_event",":","Serialized","event","to","be","published",".","headers",":","Message","headers","to","be","published","if","`","self.event_broker","`","is","a","`","PikaEventBroker","`","."]
code: def _publish_with_message_headers(
      self,
      original_event: Dict[Text, Any],
      headers: Optional[Dict[Text, Text]],
  ) -> None:
      """Publish `event` to a message broker with `headers`.
  
      Args:
          original_event: Serialized event to be published.
          headers: Message headers to be published if `self.event_broker` is a
              `PikaEventBroker`.
  
      """
      if self.offset_timestamps_by_seconds is not None:
          event = dict(original_event)
          event["timestamp"] += self.offset_timestamps_by_seconds
      else:
          event = original_event
  
      if isinstance(self.event_broker, PikaEventBroker):
          self.event_broker.publish(event=event, headers=headers)
      else:
          self.event_broker.publish(event)
  
imports: import logging
  import uuid
  import datetime
  from typing import AsyncIterator, Text, Optional, List, Set, Dict, Any
  from tqdm import tqdm
  import rasa.shared.utils.cli
  import rasa.shared.utils.io
  from rasa.core.brokers.broker import EventBroker
  from rasa.core.brokers.pika import PikaEventBroker
  from rasa.core.constants import RASA_EXPORT_PROCESS_ID_HEADER_NAME
  from rasa.core.tracker_store import TrackerStore
  from rasa.shared.core.trackers import EventVerbosity
  from rasa.exceptions import NoEventsToMigrateError, NoConversationsInTrackerStoreError, PublishingError
label_desc: Use image node_id 4 for calling the Exporter obj's underlying member method code with example usage: obj._publish_with_message_headers(original_event, headers) without return types