def _error_string(error, k=None):
package = error.getPackage()<EOL>if package == '<STR_LIT>':<EOL><INDENT>package = '<STR_LIT>'<EOL><DEDENT>template = '<STR_LIT>'<EOL>error_str = template.format(k, error.getSeverityAsString(),<EOL>error.getCategoryAsString(), package,<EOL>error.getLine(), error.getShortMessage(),<EOL>error.getMessage())<EOL>return error_str<EOL>
String representation of SBMLError.

    Parameters
    ----------
    error : libsbml.SBMLError
    k : index of error

    Returns
    -------
    string representation of error