def clean_start_year(x):
# Account for the 7 year offset in the database
return x + 7
def process_record(record):
record['start year'] = clean_start_year(record['record'])
It's perfectly obvious what this code does, but without the comment it's totally unclear why it does what it does.