new_contents: import os
  import sys
  import psutil
  import logging
  
  def restart_program():
      """Restarts the current program, with file objects and descriptors
         cleanup
      """
  
      try:
          p = psutil.Process(os.getpid())
          for handler in p.get_open_files() + p.connections():
              os.close(handler.fd)
      except Exception as e:
          logging.error(e)
  
      python = sys.executable
      os.execl(python, python, *sys.argv)
  
subject: add a self aware module