Move generate_text_for_storage function

n/a