old_contents: import os.path
  import sys
  
  # This bit of evil should inject third_party into the path for relative imports.
  sys.path.append(os.path.dirname(__file__))
  
new_contents: import os.path
  import sys
  
  # This bit of evil should inject third_party into the path for relative imports.
  sys.path.insert(1, os.path.dirname(__file__))
  
subject: Insert third_party into the second slot of sys.path rather than the last slot