old_contents: #!/usr/bin/env python
  # encoding: utf-8
  
  import sys
  import os
  
  # Taken from legacy python unittest
  class WritelnDecorator:
      """Used to decorate file-like objects with a handy 'writeln' method"""
      def __init__(self,stream):
          self.stream = stream
  
      def __getattr__(self, attr):
          return getattr(self.stream,attr)
  
      def writeln(self, arg=None):
          if arg: self.write(arg)
          self.write('\n') # text-mode streams translate to \r\n if needed
  
  
new_contents: #!/usr/bin/env python
  # encoding: utf-8
  
  import sys
  import os
  
  
  # Taken from legacy python unittest
  class WritelnDecorator:
      """Used to decorate file-like objects with a handy 'writeln' method"""
      def __init__(self, stream):
          self.stream = stream
  
      def __getattr__(self, attr):
          return getattr(self.stream,attr)
  
      def writeln(self, arg=None):
          if arg: self.write(arg)
          self.write('\n') # text-mode streams translate to \r\n if needed
  
  
subject: delete unused import