def parse_line(line, import_date):
    award = {}
    award['cfda'] = line[0:7].strip()
    if not RE_CFDA.match(award['cfda']):
        raise InvalidCFDAProgramNumber(award['cfda'])

    award['action'] = line[135]
    award['award_id'] = line[142:158].strip()
    try:
        award['award_mod'] = int(line[158:162].strip())
    except __HOLE__:
        award['award_mod'] = None
    award['fed_amount'] = int(line[162:173])
    award['correction_indicator'] = line[223]

    # for aggregates obligation date is the last day of the quarter
    award['obligation_date'] = date(year=int(line[196:200]), 
                                    month=int(line[200:202]), 
                                    day=int(line[202:204]))

    award['import_date'] = import_date
    award['reporting_lag'] = (award['import_date'] - award['obligation_date']).days
    
    fiscal_year = get_fiscal_year(award['obligation_date'])
    
    award['fiscal_year_lag'] = (import_date - date(year=fiscal_year, 
                                                   month=9, 
                                                   day=30)).days

    award['fiscal_year'] = fiscal_year

    return award
dataset/ETHPy150Open sunlightlabs/clearspending/timeliness/parser.py/parse_line