def provide_table(engine, table, todo, chunksize=None, index=True):
    if sqla.inspect(engine).has_table(table):
        return pd.read_sql_table(table, engine, chunksize=chunksize)
    df = todo()
    df.to_sql(table, engine, index=index)
    return df
def provide_table(engine, table, todo, chunksize=None, index=True):
    if sqla.inspect(engine).has_table(table):
        return pd.read_sql_table(table, engine, chunksize=chunksize)
    df = todo()
    df.to_sql(table, engine, index=index)
    return df