<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _format_reinit_msg(self, name, kwargs=None, triggered_directly=True):
 """Returns a message that informs about re-initializing a compoment. Sometimes, the module or optimizer need to be re-initialized. Not only should the user receive a message about this but also should they be informed about what parameters, if any, caused it. """

        msg = "Re-initializing {}".format(name)
        if triggered_directly and kwargs:
            msg += (" because the following parameters were re-set: {}."
                    .format(', '.join(sorted(kwargs))))
        else:
            msg += "."
        return msg