<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def invoke_method_on_children(self, func_name=None, *args, **kwargs):
 """This helper method will walk the primary base class hierarchy to invoke a method if it exists for a given child base class. :param func_name: The name of a function to search for invocation. :type func_name: str :param args: An argument list to pass to the target function. :type args: list :param kwargs: A dictionary of name/value pairs to pass to the target function as named arguments. :type kwargs: dict :return: None :raises ValueError: Thrown if no function name is provided. In an effort to explain, assume that a class hierarchy has been defined as in the image below: .. image:: images/invoke_method_on_children_class_hierarchy.png *invoke_method_on_children* will traverse the class hierarchy invoking target method *the_func* on each child class. This is different from normal python resolution, which will only invoke the first instance of the method defined in the class hierarchy, which would be *Child3.the_func*. .. image:: images/invoke_method_on_children.png .. note:: Mind the flow of invocation on the class hierarchy. Invocation of target *func_name* is from the *ComponentCore* class as the starting point, and the search continuing out toward the final ancestor class. ::Example Usage: To utilize this method, a function name must be provided. .. warning:: Beware mistyped method names. If a method name is supplied for a method that does not exist, the *invoke_method_on_children* will raise no exception. Traceback (most recent call last):
 ValueError: invoke_method_on_children:func_name parameter required In actual usage, declare a *ComponentCore* derived child class with a target function. It is possible to have more than one ancestor class with the target function defined. The *invoke_method_on_children* will execute the function on each of the child classes. With an instance of a *AttributeHelper* child class, we can invoke the method in two ways, as exampled below. ('a_key:', 'a_value') ('a_key:', 'value') """

        if func_name is None:
            raise ValueError(
                'invoke_method_on_children:func_name parameter required')

        class_stack = []
        base = self.__class__  # The root class in the hierarchy.
        while base is not None and base is not object:
            class_stack.append(base)
            base = base.__base__  # iterate to the next base class

        while len(class_stack) is not 0:
            base = class_stack.pop()
            if func_name in base.__dict__:  # check the func exist on class
                # instance
                func = getattr(base, func_name)
                func(self, *args,
                     **kwargs)