def generate_latex_error(error_msg):
    error_msg = error_msg.replace("\n", "\\MessageBreak ")
    s = """\\PackageError{vistrails}{ An error occurred when executing vistrails. \\MessageBreak
%s
}{}""" % error_msg
    return s

###############################################################################
generate_latex_error(error_msg: str) -> str
dataset/ETHPy150Open VisTrails/VisTrails/extensions/latex/includevistrail.py/generate_latex_error