<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def invalidate(self, name):
 # type: (str) -> None """ Invalidates the given component :param name: Name of the component to invalidate :raise ValueError: Invalid component name """

        with self.__instances_lock:
            try:
                stored_instance = self.__instances[name]
            except KeyError:
                raise ValueError(
                    "Unknown component instance '{0}'".format(name)
                )
            else:
                # Call back the component during the invalidation
                stored_instance.invalidate(True)