def _reformat_mspass_error(
    mserr, prefix_message, suffix_message="Some requested metrics may not be computed"
):
    """
    Helper for below used to reformat a message from ccore functions that
    throw a MsPASSError.   Needed to produce rational messages from
    different error metric calculations.


    :param mserr:  MsPASSError object caught with a try: except: block

    :param prefix_message:  string that becomes the first part of the revised
    message posted.

    :param suffix_message:  string that becomes a third line of the revised
    message posted.  Note this string is always preceded by a newline so do not
    put a newline in this arg unless you want a blank line.

    :return:  expand message string

    """
    log_message = "FD_snr_estimator:  error in computing an snr metric"
    log_message += prefix_message
    log_message += mserr.message
    log_message += "\n"
    log_message += suffix_message
    return log_message