code: def write_to_file(self, filename):
          
          fid = open(filename, 'w')
  
          for key in self.key_order:
              if(key == -1):
                  fid.write('\n')
              else:
                  fid.write('{0}\n'.format(self[key]))
  
          fid.close()
docs: Write the configuration to a file. Use the correct order of values.