import difflib


def diff_texts(a, b, filename):
    """Return a unified diff of two strings."""
    a = a.splitlines()
    b = b.splitlines()
    return '\n'.join(difflib.unified_diff(
        a, b,
        filename, filename,
        "(original)", "(refactored)",
        lineterm="",
    ))