<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_err_msg(row, col, fld, val, prt_flds):
 """Return an informative message with details of xlsx write attempt."""

        import traceback
        traceback.print_exc()
        err_msg = (
            "ROW({R}) COL({C}) FIELD({F}) VAL({V})\n".format(R=row, C=col, F=fld, V=val),
            "PRINT FIELDS({N}): {F}".format(N=len(prt_flds), F=" ".join(prt_flds)))
        return "\n".join(err_msg)