<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_log(request, message_type, message):
 """ Formats a log message similar to gevent's pywsgi request logging. """

    from django_socketio.settings import MESSAGE_LOG_FORMAT
    if MESSAGE_LOG_FORMAT is None:
        return None
    now = datetime.now().replace(microsecond=0)
    args = dict(request.META, TYPE=message_type, MESSAGE=message, TIME=now)
    return (MESSAGE_LOG_FORMAT % args) + "\n"