<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_log_message(log_dict, use_sql_info=False, fmt=True):
 """ Create the logging message string. """

    log_msg = (
        "%(remote_address)s %(user_email)s %(method)s %(url)s %(status)d "
        "%(content_length)d (%(request_time).2f seconds)"
    )
    if use_sql_info:
        sql_time = sum(
            float(q['time']) for q in connection.queries) * 1000
        extra_log = {
            'nr_queries': len(connection.queries),
            'sql_time': sql_time}
        log_msg += " (%(nr_queries)d SQL queries, %(sql_time)f ms)"
        log_dict.update(extra_log)
    return log_msg % log_dict if fmt else log_msg