import difflib


def compare(text1, text2):
    """Utility function for comparing text and returining differences."""
    diff = difflib.ndiff(str(text1).splitlines(True), str(text2).splitlines(True))
    return '\n' + '\n'.join(diff)