code: def compose_err_msg(msg, **kwargs):
      """Append key-value pairs to msg, for display. # noqa: D301.
  
      Parameters
      ----------
      msg : string
          Arbitrary message.
  
      kwargs : dict, optional
          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'
      >>>
  
      """
      updated_msg = msg
      for k, v in sorted(kwargs.items()):
          if isinstance(v, str):  # print only str-like arguments
              updated_msg += f"\n{k}: {v}"
  
      return updated_msg
  
imports: import inspect
  from sklearn.base import BaseEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: compose_err_msg(msg) and returns: updated_msg