code: def check_alive_instances(self):
          
          # Only for external
          for instance in self.instances:
              if instance in self.to_restart:
                  continue
  
              if instance.is_external and instance.process and not instance.process.is_alive():
                  logger.error("The external module %s died unexpectedly!", instance.name)
                  logger.info("Setting the module %s to restart", instance.name)
                  # We clean its queues, they are no more useful
                  instance.clear_queues(self.daemon.sync_manager)
                  self.set_to_restart(instance)
                  # Ok, no need to look at queue size now
                  continue
  
              # Now look for maximum queue size. If above the defined value, the module may have
              # a huge problem and so bailout. It's not a perfect solution, more a watchdog
              # If max_queue_size is 0, don't check this
              if self.daemon.max_queue_size == 0:
                  continue
  
              # Check for module queue size
              queue_size = 0
              try:
                  queue_size = instance.to_q.qsize()
              except Exception:  # pylint: disable=broad-except
                  pass
              if queue_size > self.daemon.max_queue_size:
                  logger.error("The module %s has a too important queue size (%s > %s max)!",
                               instance.name, queue_size, self.daemon.max_queue_size)
                  logger.info("Setting the module %s to restart", instance.name)
                  # We clean its queues, they are no more useful
                  instance.clear_queues(self.daemon.sync_manager)
                  self.set_to_restart(instance)
docs: Check alive instances.
          If not, log error and try to restart it
  
          :return: None