def METHOD_NAME(
    *,
    connection: Connection,
    table: Table,
    columns: T.Tuple[str],
    record_iterable: T.Iterable,
):
    """Generator that persists batches of records from the given generator into the local database
    Yields after every batch."""
    dict_iterable = (dict(zip(columns, row)) for row in record_iterable)
    for group in iterate_in_chunks(10000, dict_iterable):
        with connection.begin():
            connection.execute(table.insert(), group)
        # self.session.flush()  -- Did this line do anything?
        yield