code: def write_roc(roc_structure, inputfilename, options, fw_type = None):
      
      # check if ./ROC_DATA exists. If not, create it
      rocdir = os.path.join(os.getcwd(), 'ROC_DATA')
      if not os.path.exists(rocdir):
          os.makedirs(rocdir)
  
      # generate the root name of the file that will hold the roc data
      if len(inputfilename.split('.')) == 1:
          rootname = inputfilename.split('.')
      else:
          rootname = inputfilename.split('.csv')[0]
  
      # add '.csv' to the root name to give the name of the file
      if fw_type:
          filename = '%s_fw_roc.csv' % rootname
      else:
          filename = '%s_roc.csv' % rootname
  
      # the path to the file
      file = os.path.join(rocdir, filename)
  
      # open file and create a csv writer object
      f = open(file, 'w')
      rocwriter = csv.writer(f)
  
      # create header
      header = ['id', 'score', 'score source', 'status', 'fpf', 'tpf']
      rocwriter.writerow(header)
  
      # write contents
      for tup in roc_structure:
          rocwriter.writerow(list(tup))
  
      f.close()
docs: writes ROC output
      :param roc_structure: a.k.a auc_structure, generated in /common_tools/classification/make_auc_structure()
      :param inputfilename: name of the file specified on the command line that contains the ensemble. This will be
      used to generate the name of the file that contains the ROC data.
      :param options:
      :return: