code: def close_pub(self):
          '''
          Close the publish connection (if established)
          '''
          if not self.cpub:
              return
  
          self.subscriber.close()
          self.subscriber = None
          self.pending_events = []
          self.cpub = Falsf close_pub(self):
          '''
          Close the publish connection (if established)
          '''
          if not self.cpub:
              return
  
          self.subscriber.close()
          self.subscriber = None
          self.pending_events = []
          self.cpub = False
docs: Close the publish connection (if established)