def function(rows):
    foo_file = open(model_output('foo.txt'), 'w')
    bar_file = open(model_output('foo.txt'), 'w') # oops, forgot to change the name when we copied

    count = 0
    for row in rows:
        count += 1

    foo_file.write(str(count))
    bar_file.write(str(count * 2))

    foo_file.close()
    bar_file.close()
