I am writing a modeling script that is composed of many functions, and I'm trying to keep a document going that looks something like this:build_model(data, outcome_variable) returns(model)     clean_data(data, outcome_variable) returns(cleaned_data)        clean_character_data(data, outcome_variable) returns(data_with_chars_cleaned)        clean_numeric_data(data_with_chars_cleaned, outcome_variable) returns(data_with_chars_and_numerics_cleaned)     train_model(clean_data, outcome_variable) returns(model)Only my modeling script is quite a bit more complicated. Basically I am wondering how people usually keep track of which functions are calling other functions, and expressing this in terms of inputs and outputs.
Are there methods for mapping out a program's flow?
architecture