code: def _autorestart_components(self, bundle):
          # type: (Bundle) -> None
          
          with self.__instances_lock:
              instances = self.__auto_restart.get(bundle)
              if not instances:
                  # Nothing to do
                  return
  
              for factory, name, properties in instances:
                  try:
                      # Instantiate the given component
                      self.instantiate(factory, name, properties)
                  except Exception as ex:
                      # Log error, but continue to work
                      _logger.exception(
                          "Error restarting component '%s' ('%s') "
                          "from bundle %s (%d): %s",
                          name,
                          factory,
                          bundle.get_symbolic_name(),
                          bundle.get_bundle_id(),
                          ex,
                      )
docs: Restart the components of the given bundle
  
          :param bundle: A Bundle object