<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_message(msg, indent=False, mtype='standard', caption=False):
 """Writes message if verbose mode is set."""

    if (mtype == 'debug' and config.DEBUG) or (mtype != 'debug' and config.VERBOSE) or mtype == 'error':
        message(msg, indent=indent, mtype=mtype, caption=caption)