def ingest_to_model(file, model, engine=None):
if engine is None:<EOL><INDENT>engine = db.engine<EOL><DEDENT>reader = csv.reader(file)<EOL>columns = tuple('<STR_LIT>'.format(n) for n in next(reader))<EOL>postgres_copy.copy_from(<EOL>file, model, engine, columns=columns, format="<STR_LIT>", HEADER=False<EOL>)<EOL>fix_autoincrement(model.__table__.name)<EOL>
Load data from a CSV file handle into storage for a
    SQLAlchemy model class.