code: def periodic_callback(self):
          
  
          if self.stopped:
              return
  
          # Check if we should start scanning again
          if not self.scanning and len(self.connections.get_connections()) == 0:
              self._logger.info("Restarting scan for devices")
              self.start_scan(self._active_scan)
              self._logger.info("Finished restarting scan for devices")
docs: Periodic cleanup tasks to maintain this adapter, should be called every second.