<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(msg, *args, **kwargs):
 """ Print out a log message. """

    if len(args) == 0 and len(kwargs) == 0:
        print(msg)
    else:
        print(msg.format(*args, **kwargs))