def METHOD_NAME():
  csvHeaders = list(set(normalize.values()))
  cabColorIndex = csvHeaders.index('cab_color')
  yield ','.join(csvHeaders)
  for fileName in os.listdir(CSV_DIR):
    if fileName.endswith('.csv') and fileName != 'alltaxis.csv':
      print('file %s' % fileName, file=sys.stderr)
      cabColor = fileName.split('_')[0]
      with open('%s/%s' % (CSV_DIR, fileName), 'r') as f:
        reader = csv.reader(f)
        headers = list(reader.__next__())
        #print('headers in: %s' % headers);
        datetimes = []
        strings = []
        for i in range(len(headers)):
          headers[i] = normalize[headers[i].strip().lower()]
          if headers[i].endswith('_date_time'):
            datetimes.append((i, csvHeaders.index(headers[i])))
          else:
            strings.append((i, csvHeaders.index(headers[i])))
        for row in reader:
          #print('  row: %s' % str(row))
          if len(row) == 0:
            continue
          csvRow = [''] * len(csvHeaders)
          csvRow[cabColorIndex] = cabColor
          for src, target in strings:
            if row[src] != '':
              csvRow[target] = row[src]
          for src, target in datetimes:
            if row[src] != '':
              try:
                dt = datetime.datetime.strptime(row[src], '%Y-%m-%d %H:%M:%S')
              except ValueError:
                print('cannot parse %s in field %s as datetime' % (row[src], headers[src]))
              else:
                # TODO: add datetime type to lucene server!
                # seconds since epoch
                csvRow[target] = str(int(dt.strftime('%s')))
          yield ','.join(csvRow)