<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _log(self, message, debug=None, **kwargs):
 """Outputs a formatted message in the console if the debug mode is activated. :param message: The message that will be printed :param debug: (optional) Overwrite of `Client.debug` :param kwargs: (optional) Arguments that will be passed to the `str.format()` method """

        display_log = self.debug
        if debug is not None:
            display_log = debug
        if display_log:
            print(message.format(**kwargs))