Similar to my strategy. Write the code as if I had all these magic functions that did steps:
def write_report():
db = connect_to_database()
data = get_data(db)
summary = summarise_data(data)
save_report(summary)
After this, do the same for each of these functions.