def METHOD_NAME(seq, values):
    if not values or len(values) == 0:
        return
    postgres = get_postgres_cursor()
    max_id = values[len(values) - 1][0]
    postgres.execute(f"SELECT setval('{seq}', {max_id});")
    connection = postgres.connection
    postgres.close()
    connection.close()