code: def get_diff_text(old, new, filename):
      
      newline = '\n'
      diff = difflib.unified_diff(
          old, new,
          'original/' + filename,
          'fixed/' + filename,
          lineterm=newline)
  
      text = ''
      for line in diff:
          text += line
  
          # Work around missing newline (http://bugs.python.org/issue2142).
          if text and not line.endswith(newline):
              text += newline + r'\ No newline at end of file' + newline
  
      return text
docs: Return text of unified diff between old and new.