def _diff_message(lhs, rhs):
    """If `lhs` and `rhs` are strings, return the a formatted message
    describing their differences. If they're not strings, describe the
    differences in their `repr()`s.

    NOTE: Only works well for strings not containing newlines.
    """
    lhs = _to_characters(lhs)
    rhs = _to_characters(rhs)

    message = u'Diff:\nl: %s\nr: %s' % stringdiffer.highlight(lhs, rhs)
    # Python2 exceptions require bytes.
    if six.PY2:
        return message.encode('UTF-8')
    else:
        return message
dataset/ETHPy150Open Yelp/Testify/testify/assertions.py/_diff_message/original