def compare(text1, text2):
    diff = difflib.ndiff(str(text1).splitlines(True), str(text2).splitlines(True))
    return '\n' + '\n'.join(diff)
Utility function for comparing text and returning differences.
dataset/ETHPy150Open F-Secure/see/see/context/resources/test/network_test.py/compare