old_contents: # Python 2/3 compat
  import sys
  if sys.version < '3':
      import codecs
      def u(x):
          return codecs.unicode_escape_decode(x)[0]
  else:
      def u(x):
          return x
  
new_contents: # Python 2/3 compat
  import sys
  if sys.version_info < (3, 0):
      import codecs
      def u(x):
          return codecs.unicode_escape_decode(x)[0]
  else:
      def u(x):
          return x
  
subject: Change Python version check to use sys.version_info