parameters: (input_file, output_file_name, configs)
docstring: Takes an input file and replaces configuration values
  
      :param input_file: input stream containing configuration input
      :param output_file_name: file name to place updating configuration
      :param configs: dictionary of configuration values
      :return:
docstring_summary: Takes an input file and replaces configuration values
docstring_tokens: Takes an input file and replaces configuration values
function: def set_config(input_file, output_file_name, configs):
      """Takes an input file and replaces configuration values
  
      :param input_file: input stream containing configuration input
      :param output_file_name: file name to place updating configuration
      :param configs: dictionary of configuration values
      :return:
      """
      with open('%s_tmp' % output_file_name, 'w') as output_file:
          configuration_values = ['%s = %s\n' % (x, configs[x]) for x in configs]
          configuration_values.append('%s\n' % PGTUNED_STRING)
          line_value = input_file.readline()
          while len(line_value):
              if line_starts_with_config(configs, line_value):
                  output_file.write('#%s' % line_value)
              else:
                  output_file.write(line_value)
              line_value = input_file.readline()
  
          output_file.writelines(configuration_values)
  
      # Replace temp file with original name
      shutil.move('%s_tmp' % output_file_name, output_file_name)
function_tokens: def set_config ( input_file , output_file_name , configs ) : with open ( '%s_tmp' % output_file_name , 'w' ) as output_file : configuration_values = [ '%s = %s\n' % ( x , configs [ x ] ) for x in configs ] configuration_values . append ( '%s\n' % PGTUNED_STRING ) line_value = input_file . readline ( ) while len ( line_value ) : if line_starts_with_config ( configs , line_value ) : output_file . write ( '#%s' % line_value ) else : output_file . write ( line_value ) line_value = input_file . readline ( ) output_file . writelines ( configuration_values ) # Replace temp file with original name shutil . move ( '%s_tmp' % output_file_name , output_file_name )