def compose_err_msg(msg, **kwargs):
updated_msg = msg<EOL>for k, v in sorted(kwargs.items()):<EOL><INDENT>if isinstance(v, _basestring):  <EOL><INDENT>updated_msg += "<STR_LIT:\n>" + k + "<STR_LIT>" + v<EOL><DEDENT><DEDENT>return updated_msg<EOL>
Append key-value pairs to msg, for display.

    Parameters
    ----------
    msg: string
        arbitrary message
    kwargs: dict
        arbitrary dictionary

    Returns
    -------
    updated_msg: string
        msg, with "key: value" appended. Only string values are appended.

    Example
    -------
    >>> compose_err_msg('Error message with arguments...', arg_num=123, \
        arg_str='filename.nii', arg_bool=True)
    'Error message with arguments...\\narg_str: filename.nii'
    >>>