code: async def emit_event(self, event):
          
          self.log.info("publishing event on %s", self.publish_topic)
          if self.config.extra['config']['pub_options']['retain']:
              try:
                  await persist_event(
                      self.publish_topic,
                      event,
                      self.pool
                  )
              except SystemError as error:
                  self.log.error(error)
                  return
  
          await asyncio.sleep(1)
docs: Publish an event
          :param event: Event object