def METHOD_NAME(self, key, data):
    """
    Publishes the data to the event stream.
    """
    publish_data = {key: data}
    pub = salt.utils.json.dumps(publish_data) + "\n\n"
    self.handler.write_message(pub)