<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _autorestart_components(self, bundle):
 # type: (Bundle) -> None """ Restart the components of the given bundle :param bundle: A Bundle object """

        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,
                    )