Better example code and sketch for fetch_study