old_contents: from __future__ import print_function
  import sys
  
  
  def errprinter(*args):
      print(*args, file=sys.stderr)
      sys.stderr.flush()
  
new_contents: from __future__ import print_function
  import sys
  
  
  def errprinter(*args):
      logger(*args)
  
  def logger(*args):
      print(*args, file=sys.stderr)
      sys.stderr.flush()
  
subject: add support for a logger function in errprinter (#681)