def get_data(feature):
    # The third column of the shapefile is the ward number
    ward_id = feature.GetField(2)

    # Get the correct ward data
    try:
        ward = ward_data[ward_id]
        print 'Processing ward "%s"' % ward_id
    except __HOLE__:
        print 'No data for ward "%s"' % ward_id
        return None

    return {
        'asian': int(ward['nhasian10']),
        'black': int(ward['nhblack10']),
        'hispanic': int(ward['hisp10']),
        'white': int(ward['nhwhite10']),
    }

# Ensure the output path exists
dataset/ETHPy150Open newsapps/englewood/demo.py/get_data